import java.io.*
import java.util.*

fun solve(A: Int, B: Int, C: Int, D: Int, E: Int, F: Int) {
    data class SugarWater(val water: Int, val sugar: Int) {
        public val total = water + sugar
        public val isValid = sugar <= water * E / 100 && 0 < total && total <= F
        public val density = if (isValid) sugar.toFloat() * 100 / (water + sugar).toFloat() else 0f
    }
    val sugarMax = F * E / 100
    val ws = (0..F / (A * 100)).asSequence()
        .flatMap { a -> (0..F / (B*100)).asSequence().map { b -> a * 100*A + b * 100*B } }
    val sugars = (0..sugarMax / C).asSequence()
        .flatMap { c -> (0..sugarMax / D).asSequence().map { d -> c*C + d*D } }
    val waterCand = ws.distinct().filter { it <= F }
    val sugarCand = sugars.distinct().filter { it <= sugarMax }
    // println(waterCand.toList().sorted())
    // println(sugarCand.toList().sorted())
    waterCand
        .flatMap { w -> sugarCand.map { s -> SugarWater(w, s) } }
        .filter { it.isValid }
        .maxBy { it.density }?.let { println("${it.total} ${it.sugar}") }
    return
}

fun main(args: Array<String>) {
    fun StringArray(size: Int, init: (Int) -> String = { "\u0000" }): Array<String> {
        return Array<String>(size, init)
    }
    class Scanner(stream: InputStream) {
        private val reader = BufferedInputStream(stream).bufferedReader()
        private var st: StringTokenizer? = null
        fun next(): String {
            while (!(st?.hasMoreTokens() ?: false)) st = StringTokenizer(reader.readLine())
            return st!!.nextToken()
        }
    }
    val sc = Scanner(System.`in`)
    val A = sc.next().toInt()
    val B = sc.next().toInt()
    val C = sc.next().toInt()
    val D = sc.next().toInt()
    val E = sc.next().toInt()
    val F = sc.next().toInt()
    solve(A, B, C, D, E, F)
}
