import Data.List


main = do
  (a:b:c:d:e:f:_) <- getLine >>= return . map read . words :: IO [Int]

  let
    sugar = func c d f
    water = func (100*a) (100*b) f

    (ws, s) = maximumBy (\(x1,y1) (x2,y2) -> compare (divint y1 x1) (divint y2 x2)) (tail [(w+s,s) | w <- water, s <- sugar, w + s <= f, (div w 100) * e >= s])

  putStr $ show ws
  putStr " "
  putStrLn $ show s

  where
    divint a b = (fromIntegral a) / (fromIntegral b)
    func a b n = nub $ sort $ concat $ map (\x -> takeWhile(<=n) (iterate (+b) x)) $ takeWhile (<=n) (iterate (+a) 0)
