judge :: Integral a => a -> a -> a -> a -> String
judge c1 c2 c3 c4
    | (c2 * c3 - c1 * c4) ^ 2 > 4 * (c2 ^ 2 - c1 * c3) * (c3 ^2 - c2 * c4) = "R"
    | otherwise                                                            = "I"

main :: IO ()
main = putStrLn .
    (\(c1 : c2 : c3 : c4 : _) -> judge c1 c2 c3 c4) . map read . words =<< getLine