a,b=int(eval(input())),int(eval(input()));print((['LESS','GREATER'][a>b] if a!=b else 'EQUAL'))
a,b=int(eval(input())),int(eval(input()));print((['ELQEUSASL'[a<b::2],'GREATER'][a>b]))
a, b = int(eval(input())), int(eval(input()))
print((["LESS", "GREATER"][a > b] if a != b else "EQUAL"))

a, b = int(eval(input())), int(eval(input()))
print((["ELQEUSASL"[a < b :: 2], "GREATER"][a > b]))

-print((["LESS", "GREATER"][a > b] if a != b else "EQUAL")) +print((["ELQEUSASL"[a < b :: 2], "GREATER"][a > b]))