import Data.Char
import Data.List
import qualified Data.ByteString.Char8 as B
main=putStrLn.solve.unfoldr(B.readInteger.B.dropWhile isSpace)=<<B.getContents
solve[a,b]=case compare a b of
  GT -> "GREATER"
  LT -> "LESS"
  EQ -> "EQUAL"