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('LESS')

elif a==b:

    print('EQUAL')

else:

    print('GREATER')
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("LESS")
elif a == b:
    print("EQUAL")
else:
    print("GREATER")

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