Problem:
 Score : 200 points    Problem Statement You are given two positive integers A and B . Compare the magnitudes of these numbers.      Constraints  1 ≤ A, B ≤ 10^{100}  Neither A nor B begins with a 0 .         Input Input is given from Standard Input in the following format:  A  B       Output Print GREATER if A>B , LESS if A<B and EQUAL if A=B .        Sample Input 1 36
24      Sample Output 1 GREATER  Since 36>24 , print GREATER .       Sample Input 2 850
3777      Sample Output 2 LESS       Sample Input 3 9720246
22516266      Sample Output 3 LESS       Sample Input 4 123456789012345678901234567890
234567890123456789012345678901      Sample Output 4 LESS

Solution (Python):
a=input()
b=input()

flag=0

if len(a)==1 and len(b)==1:
  if int(b) < int(a):
    print('GREATER')
    flag=1
  elif int(b) > int(a):
    print('LESS')
    flag=1
  else:
    print('EQUAL')
    flag=1
    
if len(a)==1 and len(b) > 1:
    print('LESS')
    flag=1
    
if len(a) > 1 and len(b)==1:
    print('GREATER')
    flag=1

if len(b) < len(a) and flag==0:
  print('GREATER')
  flag=1
if len(b) > len(a) and flag==0:
  print('LESS')
  flag=1

  
if len(a)==len(b):  
  for i in range(len(a)):
    if b[i] < a[i] and flag==0:
      print('GREATER')
      flag=1
    elif b[i] > a[i] and flag==0:
      print('LESS')
      flag=1
    
if flag==0:
  print('EQUAL')

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a == b:
    print('EQUAL')
else:
    print('LESS')

Solution (Python):
a = int(input())
b = int(input())
if (a > b):
  print('GREATER')
elif (a < b):
  print('LESS')
else:
  print('EQUAL')

Solution (Python):
A=int(input())
B=int(input())

if A>B:
  print('GREATER')
if A<B:
  print('LESS')
if A==B:
  print('EQUAL')

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a == b:
    print('EQUAL')    
else:
    print('LESS')

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a == b:
    print('EQUAL')
else:
    print('LESS')

Solution (Python):
import sys
A = int(input())
B = int(input())
if(A > B):
    print("GREATER")
    sys.exit()
if(A < B):
    print("LESS")
    sys.exit()
else:
    print("EQUAL")

Solution (Python):

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

Solution (Python):
a=int(input())
b=int(input())
print("LESS"if a<b else("GREATER"if a>b else"EQUAL"))

Solution (Python):
a = int(input())
b = int(input())
if a > b:
  print('GREATER')
elif a==b:
  print('EQUAL')
else:
  print('LESS')

Solution (Python):
a = int(input())
b = int(input())
if a>b:
	print('GREATER')
elif a<b:
	print('LESS')
else:
	print('EQUAL')

Solution (Python):
A = int(input())
B = int(input())
if A > B:
    print('GREATER')
elif A < B:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
A = int(input())
B = int(input())

if A > B:
    print("GREATER")
elif A < B:
    print("LESS")
else:
    print("EQUAL")

Solution (Python):
As = input()
Bs = input()

lenA, lenB = len(As), len(Bs)
if lenA > lenB:
    print('GREATER')
elif lenA < lenB:
    print('LESS')
else:
    for A, B in zip(As, Bs):
        A, B = int(A), int(B)
        if A > B:
            print('GREATER')
            break
        elif A < B:
            print('LESS')
            break
    else:
        print('EQUAL')

Solution (Python):
A = int(input())
B = int(input())

if A > B:
    print('GREATER')
elif A < B:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
A = int(input())
B = int(input())

Ans = "EQUAL"
if A>B:
    Ans = "GREATER"
elif A<B:
    Ans = "LESS"

print(Ans)

Solution (Python):
str_a = input()
str_b = input()

int_len = len(str_a) if len(str_a) > len(str_b) else len(str_b)



for x, y in zip(str_a.zfill(int_len), str_b.zfill(int_len)):
    if int(x) > int(y):
        print("GREATER")
        exit(0)
    elif int(x) < int(y):
        print("LESS")
        exit(0)
    else:
        pass
print("EQUAL")

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

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

Solution (Python):
while(True):
    try:
        s, t = [input() for i in range(2)]
        if len(s) > len(t):
            print("GREATER")
        elif len(s) < len(t):
            print("LESS")
        else:
            print("GREATER" if s > t else "LESS" if s < t else "EQUAL")
    except EOFError:
        exit()

Solution (Python):
a=int(input())
b=int(input())
print("GREATER" if a>b else "LESS" if a<b else "EQUAL")

Solution (Python):
a =int(input())
b =int(input())
if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
a = int(input())
b = int(input())

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

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

Solution (Python):
A=input()
B=input()
if A==B:
    print("EQUAL")
if len(A)>len(B):
    print("GREATER")
elif len(B)>len(A):
    print("LESS")
else:
    for i in range(len(A)):
        if A[i]>B[i]:
            print("GREATER")
            break
        elif B[i]>A[i]:
            print("LESS")
            break

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

Solution (Python):
a=int(input())
b=int(input())
if a>b:
  print('GREATER')
elif a<b:
  print('LESS')
else:
  print('EQUAL')

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

Solution (Python):
def abc059_b():
    a = int(input())
    b = int(input())
    if a > b:
        print("GREATER")
    elif a < b:
        print("LESS")
    else:
        print("EQUAL")


abc059_b()

Solution (Python):
a  = int(input())
b = int(input())
if a < b:print("LESS")
elif a == b:print("EQUAL")
else:print("GREATER")

Solution (Python):
a = int(input())
b = int(input())

if(a<b):
    print('LESS')
elif(a==b):
    print('EQUAL')
else:
    print('GREATER')

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

Solution (Python):
A = int(input())
B = int(input())
if len(str(A)) > len(str(B)):
    print('GREATER')
elif len(str(A)) < len(str(B)):
    print('LESS')
elif A == B:
    print('EQUAL')
else:
    a = [int(i) for i in str(A)]
    b = [int(j) for j in str(B)]
    for i in range(len(str(A))):
        if a[i] > b[i]:
            print('GREATER')
            break
        elif a[i] < b[i]:
            print('LESS')
            break

Solution (Python):
A = int(input())
B = int(input())
if A > B:
    print('GREATER')
elif A < B:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
A = input()
B = input()
if len(A) > len(B):
    print("GREATER")
elif len(A) < len(B):
    print("LESS")
elif A > B:
    print("GREATER")
elif A < B:
    print("LESS")
else:
    print("EQUAL")

Solution (Python):
A = int(input().rstrip())
B = int(input().rstrip())
if A == B:
    print("EQUAL")
elif A > B:
    print("GREATER")
else:
    print("LESS")

Solution (Python):



def main():
    """Function."""
    a = str(input())
    b = str(input())

    if len(a) > len(b):
        print("GREATER")
    elif len(b) > len(a):
        print("LESS")
    else:
        flag = 0
        for i in range(len(a)):
            if int(a[i]) > int(b[i]):
                print("GREATER")
                flag = 1
                break
            elif int(a[i]) < int(b[i]):
                print("LESS")
                flag = 1
                break
            else:
                pass
        if flag == 0:
            print("EQUAL")


if __name__ == "__main__":
    main()

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

Solution (Python):
def main():
    a = input()
    b = input()
    l = max(len(a), len(b))
    a = a.zfill(l)
    b = b.zfill(l)
    if a > b:
        print('GREATER')
    elif a < b:
        print('LESS')
    else:
        print('EQUAL')


if __name__ == '__main__':
    main()

Solution (Python):
a = input()
b = input()
if len(a) > len(b):
    print("GREATER")
elif len(a) < len(b):
    print("LESS")
else:
    for i in range(len(a)):
        if int(a[i]) > int(b[i]):
            print("GREATER")
            exit()
        elif int(a[i]) < int(b[i]):
            print("LESS")
            exit()
    print("EQUAL")

Solution (Python):
A = input()
B = input()
AA = "%101s" % A
BB = "%101s" % B
if AA == BB:
    print("EQUAL")
elif AA>BB:
    print("GREATER")
else:
    print("LESS")

Solution (Python):
A = int(input())
B = int(input())

if (A > B) :
    print("GREATER")
elif (A == B) :
    print("EQUAL")
else :
    print("LESS")

Solution (Python):

A = int(input())
B = int(input())
S = A-B
if S > 0:
  print("GREATER")
elif S == 0:
  print("EQUAL")
else:
  print("LESS")

Solution (Python):
A = input()
B = input()
if A == B:
  print("EQUAL")
else:
  if len(A) > len(B):
    print("GREATER")
  elif len(B) > len(A):
    print("LESS")
  else:
    if A > B:
      print("GREATER")
    else:
      print("LESS")

Solution (Python):
A = int(input().strip())
B = int(input().strip())

if A>B:
    print('GREATER')
elif A<B:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
a=int(input())
b=int(input())
print(['EQUAL','GREATER','LESS'][(a>b)-(a<b)])

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

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

Solution (Python):
a=int(input())-int(input())
print(['LESS','GREATER','EQUAL'][(a>=0)+(a==0)])

Solution (Python):
a=int(input())
b=int(input())
if a>b:
  print('GREATER')
elif a==b:
  print('EQUAL')
else:
  print('LESS')

Solution (Python):
a = int(input())
b = int(input())
if a > b:
    print("GREATER")
elif a == b:
    print("EQUAL")
elif a < b:
    print("LESS")

Solution (Python):
A=int(input())
B=int(input())

if(A>B):
    print("GREATER")
elif(A<B):
    print("LESS")
elif(A==B):
    print("EQUAL")

Solution (Python):
A = int(input())
B = int(input())
print(['LESS', 'EQUAL', 'GREATER'][(A >= B)+(A > B)])

Solution (Python):
a=input()
b=input()
flg=0
if len(a) > len(b):
    print("GREATER")
elif len(a) < len(b):
    print("LESS")
else:
    for i in range(len(a)):
        if ord(a[i]) > ord(b[i]):
            print("GREATER")
            flg=1
            break
        elif ord(a[i]) < ord(b[i]):
            print("LESS")
            flg=1
            break
    if(flg==0):
        print("EQUAL")

Solution (Python):

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

Solution (Python):

import sys
A = input()
B = input()

ans="EQUAL"
if len(A)>len(B):
    ans="GREATER"
elif len(A)<len(B):
    ans="LESS"
else:
    for a, b in zip(A, B):
        a, b = int(a), int(b)
        if a>b:
            ans="GREATER"
            break
        elif a<b:
            ans="LESS"
            break
print(ans)

Solution (Python):
A = int(input())
B = int(input())

if A > B:
    print("GREATER")
elif A < B:
    print("LESS")
else:
    print("EQUAL")

Solution (Python):
a = input()
b = input()

if len(a) > len(b):
	print('GREATER')
elif  len(a) < len(b):
	print('LESS')
elif a == b:
	print('EQUAL')
else:
	for i in range(len(a)):
		if int(a[i]) < int(b[i]):
			print('LESS')
			break
		elif int(a[i]) > int(b[i]):
			print('GREATER')
			break

Solution (Python):
a = int(input())
b = int(input())
if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
elif a == b:
    print('EQUAL')

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

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

Solution (Python):
a=int(input())
b=int(input())

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

Solution (Python):
A = input()
B = input()
digita = A.__len__()
digitb = B.__len__()
if digita > digitb:
  print("GREATER")
elif digita < digitb:
  print("LESS")
else:
  for i in range(digita):
    if A[i] > B[i]:
      print("GREATER")
      break
    elif A[i] < B[i]:
      print("LESS")
      break
  else:
    print("EQUAL")

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

Solution (Python):
A = int(input().rstrip())
B = int(input().rstrip())

result = 'EQUAL'
if A > B:
    result = 'GREATER'
elif A < B:
    result = 'LESS'

print(result)

Solution (Python):
A = int(input())
B = int(input())
ans = 'EQUAL'
if A > B:
	ans = 'GREATER'
if A < B:
	ans = 'LESS'
print(ans)

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

Solution (Python):
a,b = int(input()),int(input())
print('GREATER' if a > b else 'LESS' if a < b else 'EQUAL')

Solution (Python):
a,b = [int(input()) for i in range(2)]
if a > b:
  print("GREATER")
elif a < b:
  print("LESS")
else:
  print("EQUAL")

Solution (Python):
a = int(input())
b = int(input())

if   a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

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

Solution (Python):
a = int(input())
b = int(input())

if a < b:
  print('LESS')
elif a > b:
  print('GREATER')
else:
  print('EQUAL')

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

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
a = input()
b = input()

a = a.zfill(100)
b = b.zfill(100)
c = [a,b]
c = sorted(c)
if a == b:
    print("EQUAL")
elif c[0] == a:
    print("LESS")
else:
    print("GREATER")

Solution (Python):
A = int(input())
B = int(input())
if A > B:
    print('GREATER')
elif A < B:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):

import sys

a = int(input())
b = int(input())

if(a == b):
    print('EQUAL')
else:
    print('LESS') if(a < b) else print('GREATER')

Solution (Python):


a=int(input())
b=int(input())

if a==b:
  print('EQUAL')
elif a>b:
  print('GREATER')
else:
  print('LESS')

Solution (Python):
a = input()
b = input()

if len(a)>len(b):
    print('GREATER')
elif len(a)<len(b):
    print('LESS')
else:
    if a==b:
        print('EQUAL')
    else:
        for i in range(0, len(a)):
            if a[i]>b[i]:
                print('GREATER')
                break
            elif a[i]<b[i]:
                print('LESS')
                break

Solution (Python):
a=int(input())
b=int(input())
if a>b:
    print('GREATER')
elif a==b:
    print('EQUAL')
else:
    print('LESS')

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

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

Solution (Python):
from sys import stdin


def main() -> int:
    a = next_str()
    b = next_str()
    print(("GREATER", "LESS", "EQUAL")[judge(a, b)])
    return 0


def judge(a: str, b: str) -> int:
    case = len(a) - len(b)
    if case > 0:
        return 0
    elif case < 0:
        return 1
    else:
        for i in range(len(a)):
            case = ord(a[i]) - ord(b[i])
            if case > 0:
                return 0
            elif case < 0:
                return 1
    return 2


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Solution (Python):
A = int(input())
B = int(input())

if A > B:
    print("GREATER")
elif A < B:
    print("LESS")
else:
    print("EQUAL")

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    A = int(input())
    B = int(input())

    if A > B:
        print("GREATER")
    elif A < B:
        print("LESS")
    else:
        print("EQUAL")


main()

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

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

Solution (Python):
a = int(input())
b = int(input())
if a<b:
    print("LESS")
elif a==b:
    print("EQUAL")
else:
    print("GREATER")

Solution (Python):
a = int(input())
b = int(input())

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

Solution (Python):
A = int(input())
B = int(input())
if A == B:
    print('EQUAL')
elif A<B:
    print('LESS')
else:
    print('GREATER')

Solution (Python):
a=int(input())
b=int(input())
if a==b:
    print('EQUAL')
else:
    print(['LESS','GREATER'][max(a,b)==a])

Solution (Python):
a, b = int(input()), int(input())
print("GREATER" if a > b else "LESS" if a < b else "EQUAL")

Solution (Python):
N = [int(input()) for i in range(2)]
print("GREATER" if N[0] > N[1] else "LESS" if N[0] < N[1] else "EQUAL")

Solution (Python):
a= int(input())
b= int(input())

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

Solution (Python):
x = int(input())-int(input())
if x>0:
  print("GREATER")
elif x==0:
  print("EQUAL")
else:
  print("LESS")

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print("GREATER")

elif a < b:
    print("LESS")

else:
    print("EQUAL")

Solution (Python):
a=int(input());b=int(input())
print(["GREATER","EQUAL","LESS"][(a<b)+(a<=b)])

Solution (Python):
A = int( input())
B = int( input())
if A == B:
    print('EQUAL')
elif A < B:
    print('LESS')
else:
    print('GREATER')

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

Solution (Python):
a=int(input())
b=int(input())

if a > b:
    print('GREATER')
elif a == b:
    print('EQUAL')
else:
    print('LESS')

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

Solution (Python):
a = int(input())
b = int(input())

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

Solution (Python):
A = int(input())
B = int(input())
if A == B:
    print('EQUAL')
elif A>B:
    print('GREATER')
else:
    print('LESS')

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    A = int(input())
    B = int(input())

    if A == B:
        print("EQUAL")
    elif A > B:
        print("GREATER")
    else:
        print("LESS")


if __name__ == '__main__':
    main()

Solution (Python):
A = input()
B = input()
if (len(A) > len(B)):
  print('GREATER')
elif (len(A) < len(B)):
  print('LESS')
else:
  i = 0
  while (i < len(A)):
    if (int(A[i]) == int(B[i])):
      i += 1
    elif (int(A[i]) < int(B[i])):
      i = -1
      break
    else:
      i = -2
      break
  if (i == -1):
    print('LESS')
  elif (i == -2):
    print('GREATER')
  else:
    print('EQUAL')

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

Solution (Python):
A=int(input())
B=int(input())
if A<B:
    print('LESS')
elif A==B:
    print('EQUAL')
else:
    print('GREATER')

Solution (Python):
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

a = ni()
b = ni()

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

Solution (Python):
a = input()
b = input()

if len(a) > len(b):
    print("GREATER")
elif len(a) < len(b):
    print("LESS")
else:
    for i in range(len(a)):
        if int(a[i]) > int(b[i]):
            print("GREATER")
            break
        elif int(a[i]) < int(b[i]):
            print("LESS")
            break
    else:
        print("EQUAL")

Solution (Python):
A = int(input())
B = int(input())
if A > B:
    print('GREATER')
elif A < B:
    print('LESS')
else:
    print('EQUAL')

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

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

Solution (Python):

"""
Created on Sat Sep  8 15:34:42 2018

@author: maezawa
"""

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

Solution (Python):
x = int(input())
y = int(input())
if x>y:
    print("GREATER")
elif x<y:
    print("LESS")
else:
    print("EQUAL")

Solution (Python):
A = input()
B = input()

if len(A) > len(B):
  print("GREATER")
  exit(0)
elif len(A) < len(B):
  print("LESS")
  exit(0)

for i in range(len(A)):
  if A[i] > B[i]:
    print("GREATER")
    exit(0)
  elif A[i] < B[i]:
    print("LESS")
    exit(0)

print("EQUAL")

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

Solution (Python):
A=int(input())
B=int(input())
if A>B:
    print('GREATER')
elif A<B:
    print('LESS')
else:
    print('EQUAL')

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

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

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

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
s=input()
t=input()
if len(s)!=len(t):
    print("LESS"if len(s)<len(t)else"GREATER")
else:
    f="LESS"if s<t else("GREATER" if t<s else"EQUAL")
    print(f)

Solution (Python):
A = int(input())
B = int(input())

if A > B:
    print('GREATER')
elif A== B:
    print('EQUAL')
elif A < B:
    print('LESS')

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

Solution (Python):

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

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

Solution (Python):
a, b = map(int, [input() for _ in range(2)])
if a > b:
  print("GREATER")
elif a == b:
  print("EQUAL")
else:
  print("LESS")

Solution (Python):


def main():
    a = int(input())
    b = int(input())
    if a > b:
        print('GREATER')
    elif a < b:
        print('LESS')
    else:
        print('EQUAL')

if __name__ == '__main__':
    main()

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

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

Solution (Python):
a = int(input())
b = int(input())

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

Solution (Python):
A = int(input())
B = int(input())

if A>B:
    print('GREATER')
elif A<B:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):
a=int(input())
b=int(input())
if a<b:
  print('LESS')
elif a>b:
  print('GREATER')
else:
  print('EQUAL')

Solution (Python):
A=int(input())
B=int(input())
if (A>B):
	print('GREATER')
elif(A==B):
	print('EQUAL')
else:
	print('LESS')

Solution (Python):
a = int(input())
b = int(input())

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

Solution (Python):
a = input()
b = input()
sgns = ['>', '<', '==']
str_sgns = ['GREATER', 'LESS', 'EQUAL']
tDict = {sgn:str_sgn for sgn, str_sgn in zip(sgns, str_sgns)}
for sgn, str_sgn in tDict.items():
    f = a + sgn + b
    if eval(f):
        print(str_sgn)
        exit()

Solution (Python):
p=input;a=int(p())-int(p());print(a>0and'GREATER'or'ELQEUSASL'[a<0::2])

Solution (Python):
p=input;a=int(p())-int(p());print(['ELQEUSASL'[a<0::2],'GREATER'][a>0])

Solution (Python):
p=input;a,b=int(p()),int(p());print("GREATER"if a>b else"ELQEUSASL"[a<b::2])

Solution (Python):
a,b=[int(input())for _ in[0]*2]
print("GREATER"if a>b else"ELQEUSASL"[a<b::2])

Solution (Python):
a = input()
b = input()

if len(a) > len(b):
    print('GREATER')
elif len(a) < len(b):
    print('LESS')
else:
    if a > b:
        print('GREATER')
    elif a < b:
        print('LESS')
    else:
        print('EQUAL')

Solution (Python):
A = int(input())
B = int(input())

if A > B:
    print("GREATER")
elif A==B:
    print("EQUAL")
else:
    print("LESS")

Solution (Python):
A = int(input())
B = int(input())

if A > B:
    print("GREATER")
elif A < B:
    print("LESS")
else:
    print("EQUAL")

Solution (Python):
a = input()
b = input()
if a < b:
  print "LESS"
if a > b:
  print "GREATER"
if a == b:
  print "EQUAL"

Solution (Python):
a=int(input())
b=int(input())

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

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

Solution (Python):
A = int(input())
B = int(input())

if A == B:
    print("EQUAL")
elif A > B:
    print("GREATER")
else:
    print("LESS")

Solution (Python):
def main():
    A = input()
    B = input()
    if A == B:
        print("EQUAL")
    elif len(A) == len(B):
        for i in range(len(A)):
            if A[i] > B[i]:
                print("GREATER")
                break
            elif A[i] < B[i]:
                print("LESS")
                break
    elif len(A) > len(B):
        print("GREATER")
    else:
        print("LESS")

if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin


def main():
    A = stdin.readline().rstrip()
    B = stdin.readline().rstrip()
    if A == B:
        print('EQUAL')
    elif len(A) < len(B):
        print('LESS')
    elif len(A) > len(B):
        print('GREATER')
    else:
        for a, b in zip(A, B):
            if a < b:
                print('LESS')
                break
            elif a > b:
                print('GREATER')
                break
            else:
                pass


if __name__ == '__main__':
    main()

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

Solution (Python):
a = int(input())
b = int(input())
if a>b:
    print('GREATER')
elif a<b:
    print('LESS')
else:
    print('EQUAL')

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

Solution (Python):
a = int(input())
b = int(input())
if a > b: print('GREATER')
elif a < b:print('LESS')
else: print('EQUAL')

Solution (Python):
A = int(raw_input())
B = int(raw_input())
print "GREATER" if A>B else ("LESS" if A<B else "EQUAL")

Solution (Python):
a = int(input())
b = int(input())

if a > b:
    print('GREATER')
elif a < b:
    print('LESS')
else:
    print('EQUAL')

Solution (Python):

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

Solution (Python):
A=int(input())
B=int(input())

if(A<B):
    print("LESS")
elif(A>B):
    print("GREATER")
else:
    print("EQUAL")

Solution (Python):
A=int(input())
B=int(input())

if(A<B):
    print("LESS")
elif(A>B):
    print("GREATER")
else:
    print("EQUAL")