a=int(eval(input()))-int(eval(input()));print((a>0 and'GREATER'or a<0 and'LESS'or'EQUAL'))
a=eval(input());b=eval(input());print(a<b and'LESS'or a>b and'GREATER'or'EQUAL')
a = int(eval(input())) - int(eval(input()))
print((a > 0 and "GREATER" or a < 0 and "LESS" or "EQUAL"))

a = eval(input())
b = eval(input())
print(a < b and "LESS" or a > b and "GREATER" or "EQUAL")

-a = int(eval(input())) - int(eval(input())) -print((a > 0 and "GREATER" or a < 0 and "LESS" or "EQUAL")) +a = eval(input()) +b = eval(input()) +print(a < b and "LESS" or a > b and "GREATER" or "EQUAL")