#include<bits/stdc++.h>
using namespace std;
int main(){
long double A,B;
cin>>A>>B;
'A'>=0;
'B'>=0;
if(A>B){
	cout<<"GREATER"<<endl;
}
if(A<B){
	cout<<"LESS"<<endl;
}
if(A==B){
	cout<<"EQUAL"<<endl;
}
return 0;
}