#include<bits/stdc++.h>
using namespace std;
int main() {
double a,b;
	cin>>a;
         cin>>b;
	if(a>b){
		cout<<"GREATER";
	}
	else  {
		if(a<b){
			cout<<"LESS";
		}
		else
		{
			cout<<"EQUAL";
		}
}
}