import scala.io.StdIn

object Main extends App {

  val Array(a, b, c, d, e, f) = StdIn.readLine().split(' ').map(_.toInt)

  def judge(water: Int, sato: Int, maxw: Int, maxs: Int): Boolean = {
    water + sato <= f && e * water  >= sato * 100 && sato * maxw > maxs * water
  }

  val waters = (0 to f).flatMap { ai => (0 to f).map(bi => 100 * ai * a + 100 * bi * b).filter(e => e < f)}

  val sugars = (0 to f).flatMap { ci => (0 to f).map(di => ci * c + di * d).filter(e => e < f)}

  var result = (1, -1)
  waters.foreach { w =>
    sugars.foreach { s =>
      //if (judge(w, s) && w != 0 && max < ((s + w) / w)) {
      if (judge(w, s, result._1, result._2) ) {
        result = (w, s)
        //println(s"$w , $s")
      }
    }
  }
  println(result._1 + result._2 + " " + result._2)
}