#include <iostream>
#include <vector>
#include <numeric>
using namespace std;

int main()
{
    long double a, b;
    cin >> a >> b;
    if (a > b)
    {
        cout << "GREATER";
    }
    else if (a < b)
    {
        cout << "LESS";
    }
    else
        cout << "EQUAL";
	return 0;
}