import Control.Applicative main = do (a:b:c:_) <- map read . lines <$> getContents let d = lcm (lcm a b) c :: Integer e = f (d`div`a) (d`div`b) (d`div`c) (d`div`b) putStrLn $ (show d) ++ '/':show e f a b c d | (a `mod` d) == (b `mod` d) && (b `mod` d) == (c `mod` d) = d | otherwise = f a b c (d-1)