#include<stdio.h>
int main(void){
    double A,B;
    scanf("%lf\n%lf",&A,&B);
    if(A>B){
        printf("GREATER");
    }else if(A<B){
        printf("LESS");
    }else if(A==B){
        printf("EQUAL");
    }
    return 0;
}
