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