main = getContents >>= putStrLn . solve . words

solve [a, b]
  | length a < length b = "LESS"
  | length a > length b = "GREATER"
  | length a == length b && a < b = "LESS"
  | length a == length b && a > b = "GREATER"
  | otherwise = "EQUAL"