-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = print . solve . map read . words =<< getLine where calc x z = (5 + 1000 * x `div` z) `div` 10 solve [a, b] = head [ m + n | x <- [1..] , y <- [a, a - 1] , y >= 0 , z <- [b, b - 1] , z >= 0 , let m = x * y `div` 100 , let n = x * z `div` 100 , let s = m + n , s > 0 , let u = calc m s , let v = calc n s , a == u && b == v]