def answer(a: str, b: str) -> str:

    if a == b:

        return 'EQUAL'



    if a < b or len(a) < len(b):

        return 'LESS'



    if a > b or len(a) > len(b):

        return 'GREATER'





def main():

    a = eval(input())

    b = eval(input())

    print((answer(a, b)))





if __name__ == '__main__':

    main()
def answer(a: int, b: int) -> str:

    if a == b:

        return 'EQUAL'



    if a < b:

        return 'LESS'



    if a > b:

        return 'GREATER'





def main():

    a = int(eval(input()))

    b = int(eval(input()))

    print((answer(a, b)))





if __name__ == '__main__':

    main()
def answer(a: str, b: str) -> str:
    if a == b:
        return "EQUAL"
    if a < b or len(a) < len(b):
        return "LESS"
    if a > b or len(a) > len(b):
        return "GREATER"


def main():
    a = eval(input())
    b = eval(input())
    print((answer(a, b)))


if __name__ == "__main__":
    main()

def answer(a: int, b: int) -> str:
    if a == b:
        return "EQUAL"
    if a < b:
        return "LESS"
    if a > b:
        return "GREATER"


def main():
    a = int(eval(input()))
    b = int(eval(input()))
    print((answer(a, b)))


if __name__ == "__main__":
    main()

-def answer(a: str, b: str) -> str: +def answer(a: int, b: int) -> str: -    if a < b or len(a) < len(b): +    if a < b: -    if a > b or len(a) > len(b): +    if a > b: -    a = eval(input()) -    b = eval(input()) +    a = int(eval(input())) +    b = int(eval(input()))