import java.io.IOException
import java.util.NoSuchElementException

fun main(args: Array<String>) {
    val fs = FastScanner()
    val A =  fs.nextInt()
    val B = fs.nextInt()
    val C = fs.nextInt()
    val D = fs.nextInt()
    val E = fs.nextInt()
    val F = fs.nextInt()
    // 全体F gram, E ぐらむが可能か
    val dp = Array(F + 1) { BooleanArray(30 * E  + 1, { false })}
    dp[0][0] = true
    val el = BooleanArray(1)

    var max = 0.0
    var maxF = 100 * A
    var maxE = 0
    val maxDensity = E.toDouble() / 100.00
    (1..F).forEach {f ->
        (1.. 30 * E).forEach {e ->
            dp[f][e] =
                    dp.getOrElse(f - 100 * A,  { el }).getOrElse(e, { false })  ||
                            dp.getOrElse(f - 100 * B, { el }).getOrElse(e, { false }) ||
                            dp.getOrElse(f - C, { el }).getOrElse(e - C, { false}) ||
                            dp.getOrElse(f - D, { el }).getOrElse(e - D, { false})
            val density = e.toDouble() / f.toDouble()
            val water = f - e
            val possibleSugar = (water / 100) * E
            if (water > 0 && (water % (100 * A) == 0 || water % (100 * B) == 0) && e <= possibleSugar) {
                if (dp[f][e] && max < density && density <= maxDensity && f >= 100 * A) {
                    max = density
                    maxF = f
                    maxE = e
                }
            }
        }
    }

    println(maxF.toString() + " " + maxE.toString())
}

internal class FastScanner {
    private val `in` = System.`in`
    private val buffer = ByteArray(1024)
    private var ptr = 0
    private var buflen = 0
    private fun hasNextByte(): Boolean {
        if (ptr < buflen) {
            return true
        } else {
            ptr = 0
            try {
                buflen = `in`.read(buffer)
            } catch (e: IOException) {
                e.printStackTrace()
            }

            if (buflen <= 0) {
                return false
            }
        }
        return true
    }

    private fun readByte(): Int {
        return if (hasNextByte()) buffer[ptr++].toInt() else -1
    }

    private fun isPrintableChar(c: Int): Boolean {
        return 33 <= c && c <= 126
    }

    operator fun hasNext(): Boolean {
        while (hasNextByte() && !isPrintableChar(buffer[ptr].toInt())) ptr++
        return hasNextByte()
    }

    operator fun next(): String {
        if (!hasNext()) throw NoSuchElementException()
        val sb = StringBuilder()
        var b = readByte()
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b)
            b = readByte()
        }
        return sb.toString()
    }

    fun nextLong(): Long {
        if (!hasNext()) throw NoSuchElementException()
        var n: Long = 0
        var minus = false
        var b = readByte()
        if (b == '-'.toInt()) {
            minus = true
            b = readByte()
        }
        if (b < '0'.toInt() || '9'.toInt() < b) {
            throw NumberFormatException()
        }
        while (true) {
            if ('0'.toInt() <= b && b <= '9'.toInt()) {
                n *= 10
                n += (b - '0'.toInt()).toLong()
            } else return if (b == -1 || !isPrintableChar(b)) {
                if (minus) -n else n
            } else {
                throw NumberFormatException()
            }
            b = readByte()
        }
    }

    fun nextInt(): Int {
        val nl = nextLong()
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw NumberFormatException()
        return nl.toInt()
    }

    fun nextDouble(): Double {
        return java.lang.Double.parseDouble(next())
    }
}