#include<cstdio>
#include<cmath>
#include<iostream>
#include<cstring>
#include<algorithm>

using namespace std;
int main(){
	char a[5][50];
	scanf("%s",a[0]);
	scanf("%s",a[1]);
	if(strlen(a[0]) > strlen(a[1]))
		printf("GERATER\n");
	if(strlen(a[0]) < strlen(a[1]))
		printf("LESS\n");
	if(strlen(a[0]) == strlen(a[1])){
		if(strcmp(a[0],a[1]) == 0)
			printf("EQUAL\n");
		if(strcmp(a[0],a[1]) < 0)
			printf("LESS\n");
		if(strcmp(a[0],a[1]) > 0)
			printf("GERATER\n");
	}
}