import Control.Monad
import Data.List

main=do
    a<-getLine
    b<-getLine
    putStrLn $ cmp a b
cmp a b
    | length a < length b = "LESS"
    | length a > length b = "GREATER"
    | a < b = "LESS"
    | a > b = "GREATER"
    | True = "EQUAL"