#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main(){
    double a, b;
    cin >> a >> b;

    string ans;
    if(a>b) ans = "GREATER";
    else if(a<b) ans = "LESS";
    else ans = "EQUAL";
    cout << ans << endl;
}
