import Data.List
import Data.Ord
import Data.Ratio

main = do
  [a,b,c,d,e,f] <- map read . words <$> getLine
  let (s, w) = swater a b c d e f
  putStrLn (show (w+s) ++ " " ++ show s)

swater a b c d e f = maximumBy (comparing (\(s,w) -> s%(s+w))) ((0,a*100) : cand)
  where
    wmax = (100 * fromIntegral f) / (fromIntegral e + 100)
    smax = fromIntegral f - wmax
    wm = floor wmax
    sm = floor smax
    cand = [(s, w) | ai<-[0..30], bi<-[0..30], ci<-[0..100], di<-[0..100],
                     let w = ai*a*100 + bi*b*100, let s = ci*c + di*d,
                     w>0, w<=wm, s>0, s<=sm, s+w<=f, e*w >= s*100]