import Data.List
main = interact $ unwords . map show . sol . map read . words
sol [a,b,c,d,e,f] = snd $ minimum 
  [(fromIntegral (w+s)/fromIntegral s,[w+s,s]) |
  n <- [0..f`div`(100*a)+1], m <- [0..f`div`(100*b)+1], 
  let w = 100*(n*a+m*b), w>0, w<=f,
  let g = min (f-w) (e*w`div`100+1), 
  p <- [0..g`div`c+1], q <- [0..g`div`d], 
  let s = p*c+q*d, 100*s<=w*e, s+w<=f]