import Control.Monad

rInt :: String -> Int
rInt str = read str :: Int

main :: IO ()
main = do
    [a,b] <- map rInt <$> replicateM 2 getLine
    if a > b then
        putStrLn "GREATER"
    else if a < b then
        putStrLn "LESS"
    else
        putStrLn "EQUAL"