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


}