import java.util.Scanner

import scala.collection.mutable

object Main extends App {
  val sc = new 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
  var ans = (0, 0)

  val a_max = F / 100 / A
  val b_max = F / 100 / B
  val c_max = F / C
  val d_max = F / D
  for {
    a <- 0 to a_max
    b <- 0 to b_max
    c <- 0 to c_max
    d <- 0 to d_max
  } {
    val w = a * A + b * B
    val s = c * C + d * D
    if (100 * w + s <= F) {
      if (s <= w * E) {
        val mass = w * 100 + s
        val d_s = s.toDouble
        if (mass != 0 && (ans._1 == 0 || (ans._2.toDouble / ans._1.toDouble) < (d_s.toDouble / mass.toDouble))) {
          ans = (mass, s)
        }
      }
    }
  }

  println(s"${ans._1} ${ans._2}")

}

