#include <iostream>
int main()
{
    double a,b;
    std::cin >> a >> b;
    if(a > b)
    {
        std::cout << "GREATER" << std::endl;
    }
    else if(a < b)
    {
        std::cout << "LESS" << std::endl;
    }
    else
    {
        std::cout << "EQUAL" << std::endl;
    }
    return 0;
}