import Control.Monad
main = replicateM 2 (readLn :: IO Integer) >>= putStrLn . str . cmp
    where
        str GT = "GREATER"
        str LT = "LESS"
        str _ = "EQUAL"
        cmp [a, b] = compare a b
