#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main() {
	double A, B;
	cin >> A >> B;
	if (A > B)
	{
		cout << "GREATER";
	}
	else {
		if (A < B)
		{
			cout << "LESS";
		}
		else {
			if (A == B)
			{
				cout << "EQUAL";
			}
		}
	}
	return 0;
}