import qualified Data.ByteString.Char8 as BS
import Data.Maybe

readInt = fst . fromJust . BS.readInt

getInt = readInt <$> BS.getLine

main = do
  a <- getInt
  b <- getInt
  let x
        | a > b = "GREATER"
        | a < b = "LESS"
        | otherwise = "EQUAL"
  putStrLn x
