main :: IO ()
main = do
  input1 <- getLine
  input2 <- getLine
  putStrLn $ check (read input1 :: Int) (read input2 :: Int)

check :: Int -> Int -> String
check n1 n2 | n1 == n2 = "EQUAL"
            | n1 > n2 = "GREATER"
            | otherwise = "LESS"
