a=int(eval(input()))

b=int(eval(input()))

print(("GREATER" if a>b else "LESS" if b>a else "EQUAL"))

a=int(eval(input()))

b=int(eval(input()))

if a>b:

  print("GREATER")

elif b>a:

  print("LESS")

else:

  print("EQUAL")
a = int(eval(input()))
b = int(eval(input()))
print(("GREATER" if a > b else "LESS" if b > a else "EQUAL"))

a = int(eval(input()))
b = int(eval(input()))
if a > b:
    print("GREATER")
elif b > a:
    print("LESS")
else:
    print("EQUAL")

-print(("GREATER" if a > b else "LESS" if b > a else "EQUAL")) +if a > b: +    print("GREATER") +elif b > a: +    print("LESS") +else: +    print("EQUAL")