#include<stdio.h>

int main(void){
 

 double s1;
 double s2;


 scanf("%lf",&s1);
 scanf("%lf",&s2);

 

 
 
   	if(s1>s2){
		printf("GREATER");
   	}else if(s1<s2){
		printf("LESS");
   	}else if(s1==s2){
		printf("EQUAL");
   	}

  	
 return 0;
}