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

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