main :: IO ()
main = do
    a <- readLn
    b <- readLn
    putStrLn $ solve a b

solve :: Int -> Int -> String
solve a b = case compare a b of
              GT -> "GREATER"
              LT -> "LESS"
              EQ -> "EQUAL"
