#-*-coding:utf-8-*-

import sys

input=sys.stdin.readline



def main():

    a = int(eval(input()))

    b = int(eval(input()))



    if a == b:

        print("EQUAL")

    elif a > b:

        print("GREATER")

    else:

        print("LESS")



if __name__=="__main__":

    main()
#-*-coding:utf-8-*-

import sys

input=sys.stdin.readline



def main():

    a = int(eval(input()))

    b = int(eval(input()))



    if a > b :

        print("GREATER")

    elif a  < b :

        print("LESS")

    elif a  == b :

        print("EQUAL")



if __name__=="__main__":

    main()
# -*-coding:utf-8-*-
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

# -*-coding:utf-8-*-
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

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