#include<cstdio>
#include<cstring>
using namespace std;
int main(){
	char s[105],t[105];
	scanf("%s%s",s,t);
	if(strcmp(s,t)<0)printf("LESS\n");
	else if(strcmp(s,t)==0)printf("EQUAL\n");
	else printf("GREATER\n");
	return 0;
}
	
	