#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;

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