#include <bits/stdc++.h>
#include <unistd.h>
using namespace std;
string func(int x1,int k1,int x2,int k2){
string s1 = to_string(x1);
string s2 = to_string(x2);
string tmp1 = s1;
string tmp2 = s2;
for(auto i = 0;i < k1-1;++i)
s1 += tmp1;
for(auto i = 0;i < k2-1;++i)
s2 += tmp2;
//cout<<s1<<endl<<s2<<endl;
if(s1.size() > s2.size())
return "Greater";
else if(s1.size() < s2.size())
return "Less";
else{
if(s1 > s2)
return "Greater";
else if(s1 < s2)
return "Less";
return "Equal";
}
}
int main(){
int x1,k1,x2,k2;
while(cin>>x1>>k1>>x2>>k2){
cout<<func(x1,k1,x2,k2)<<endl;
}
return 0;
}