{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}

module Main where

import qualified Data.ByteString.Char8 as B8
import Data.Maybe (fromJust)
import Data.Char (toUpper)
import Data.List
import qualified Data.Map as M
import Data.Ix (range)
import Control.Monad
import Control.Applicative
import Text.Printf

readDigits = map read <$> words <$> getLine :: IO [Int]

solve a b
    | a > b = "GREATER"
    | a < b = "LESS"
    | a == b = "EQUAL"

main :: IO ()
main = do
    a <- readLn :: IO Int
    b <- readLn :: IO Int
    putStrLn $ solve a b