#include <bits/stdc++.h>
#include <assert.h>

using namespace std;

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

	return 0;
}
