a = int(eval(input()))

b = int(eval(input()))



if a == b:

    print("EQUAL")

elif a > b:

    print("GREATER")

else:

    print("LESS")

A = int(eval(input()))

B = int(eval(input()))



if A > B:

    print('GREATER')

elif A < B:

    print('LESS')

else:

    print('EQUAL')

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

A = int(eval(input()))
B = int(eval(input()))
if A > B:
    print("GREATER")
elif A < B:
    print("LESS")
else:
    print("EQUAL")

-a = int(eval(input())) -b = int(eval(input())) -if a == b: +A = int(eval(input())) +B = int(eval(input())) +if A > B: +    print("GREATER") +elif A < B: +    print("LESS") +else: -elif a > b: -    print("GREATER") -else: -    print("LESS")