data class Result(val concentration: Double, val total: Int, val sugar: Int)

fun main(args: Array<String>) {
    val list = readLine()?.split(" ")?.map { it.toInt() } ?: return
    val a = list[0]
    val b = list[1]
    val c = list[2]
    val d = list[3]
    val e = list[4]
    val f = list[5]

    var result = Result(0.0, 0, 0)

    for (aw in 0..(f / (100 * a))) {
        for (bw in 0..(f / (100 * b))) {
            for (cs in 0..(f / c)) {
                for (ds in 0..(f / d)) {
                    val sugar = (cs * c) + (ds * d)
                    val water = (100 * a * aw) + (100 * b * bw)
                    if (water == 0) {
                        continue
                    }
                    if ((water + sugar) > f) {
                        continue
                    }
                    if ((sugar.toDouble() / water.toDouble()) > (e.toDouble() / 100.0)) {
                        continue
                    }
                    val concentration = calc(water, sugar)
                    if (concentration > result.concentration) {
                        result = Result(concentration, water + sugar, sugar)
                    }
                }
            }
        }
    }
    if (result.concentration == 0.0) {
        println("${100 * a} 0")
    } else {
        println("${result.total} ${result.sugar}")
    }
}

// 濃度計算
private fun calc(a: Int, b: Int):Double {
    if (b == 0) {
        return 0.0
    }
    return ((100 * b).toDouble()) / ((a + b).toDouble())
}