main = do
  line <- getLine
  let a = read line :: Int
  line <- getLine
  let b = read line :: Int
  putStrLn $ case compare a b of GT -> "GREATER"
                                 EQ -> "EQUAL"
                                 LT -> "LESS"