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`a) putStrLn $ (show d) ++ '/':show e f a b c d | (a `mod` d) == (b `mod` d) && (b `mod` d) == (c `mod` d) = d | d <= 1 = 1 | otherwise = f a b c (d-1)