#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main() 
{
    int i=0;
    long long x1;
    long long k1;
    long long x2;
    long long k2;
    cin>>x1;
    cin>>k1;
    cin>>x2;
    cin>>k2;
    string a;
    string b;
    string c;
    string d;
    while(x1)
    {
        a+=x1%10;
        x1/=10;
    }
    reverse(a.begin(),a.end());
    for(i=0;i<k1;i++)
    {
        c+=a;
    }
    while(x2)
    {
        b+=x2%10;
        x2/=10;
    }
    reverse(b.begin(),b.end());
    for(i=0;i<k2;i++)
    {
        d+=b;
    }
    int len1=c.size();
    int len2=d.size();
    if(len1>len2)
    {
        cout<<"Greater";
    }
    else 
    {
        if(len1<len2)
        {
            cout<<"Less";
        }
        else 
        {
            for(i=0;i<len1;i++)
            {
                if(c[i]!=d[i])
                {
                    if(c[i]>d[i])
                    {
                        cout<<"Greater";
                    }
                    else 
                    {
                        cout<<"Less";
                    }
                    break;
                }
            }
            if(i==len1)
            {
                cout<<"Equal";
            }
        }
    }
    return 0;
}