import java.util.*

fun main(args: Array<String> ) {
    val sc = Scanner( System.`in` )
    val A = sc.nextInt()
    val B = sc.nextInt()
    val C = sc.nextInt()
    val D = sc.nextInt()
    val E = sc.nextInt()
    val F = sc.nextInt()
    val water = BooleanArray( F + 1, { it % ( 100 * A ) == 0 } )
    for ( i in water.indices ) {
        if ( water[i] && i + 100 * B < water.size ) water[i + 100 * B] = true
    }
    val sugar = BooleanArray( F + 1, { it % C == 0 } )
    for ( i in sugar.indices ) {
        if ( sugar[i] && i + D < sugar.size ) sugar[i + D] = true
    }

    var bestSugar = 0
    var bestTotal = 100 * A
    for ( w in 1 .. F ) {
        if ( ! water[w] ) continue
        for ( s in 1 .. F - w ) {
            if ( ! sugar[s] ) continue
            if ( s > E * w / 100 ) break
            if ( s * bestTotal > bestSugar * ( s + w ) ) {
                bestSugar = s
                bestTotal = s + w
            }
        }
    }
    println( "$bestTotal $bestSugar" )
}