import           Control.Monad
import           Control.Applicative

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

  putStrLn $ f a b

f :: Int -> Int -> String
f a b | a > b     = "GREATER"
      | a < b     = "LESS"
      | otherwise = "EQUAL"