#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)a;i<(int)b;++i)
int main(){
  double a,b;cin>>a>>b;
  if(a>b)cout<<"GREATER"<<endl;
  else if(a<b)cout<<"LESS"<<endl;
  else cout<<"EQUAL"<<endl;
    return 0;
}