import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [a,b] <- map (read::String->Integer) . lines <$> getContents
  putStrLn $ compare' a b

compare' a b | a<b = "LESS" | a==b = "EQUAL" | a>b = "GREATER"