#include <bits/stdc++.h>

using namespace std;

int main()
{
    long double A, B;
    cin >> A;
    cin >> B;
    if (A==B){
    cout << "EQUAL";

    } else if (A>B){
    cout <<"GREATER";
    }else if (A<B){
    cout << "LESS";
    }
    return 0;
}
