#include<iostream>
using namespace std;
int main(){
	double A;
	double B;
	scanf("%lf",&A);
	scanf("%lf",&B);
	if(A>=1&&B>=1){
		if(A>B)
	cout<<"GREATER";
	else if(B>A)
	cout<<"LESS";
	else if(A==B)
	cout<<"EQUAL";
	}
	else
	cout<<"Wrong";
	return 0;
}