#include<bits/stdc++.h>
using namespace std;
int main(){
  double a,b;
  cin >> a >> b;
  string ans;
  if(a>b){
    ans ="GREATER";
  }
  else if(a==b){
    ans="EQUAL";
  }
  else{
    ans="LESS";
  }
  cout << ans << endl;
}