object Main extends App {
  val Array(a,b,c,d,e,f) = readLine.split(" ").map{_.toInt}
  (for (x <- 0 to 30;
        y <- 0 to 30;
        z <- 0 to 100;
        w <- 0 to 100;
        if (x + y > 0 &&
            100*a*x+100*b*y+c*z+d*w <= f &&
            (c*z+d*w).toDouble / (100*a*x+100*b*y).toDouble <= e.toDouble / 100.0)
       ) yield {(x,y,z,w)}
  ).sortWith{
    case ((x1,y1,z1,w1),(x2,y2,z2,w2)) =>
       (c*z1+d*w1).toDouble / (100*a*x1+100*b*y1).toDouble >
       (c*z2+d*w2).toDouble / (100*a*x2+100*b*y2).toDouble
  }.head match {
    case (x,y,z,w) => println((100*a*x+100*b*y+c*z+d*w) + " " + (c*z+d*w))
  }                        
}