import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int x1 = in.nextInt();
int k1 = in.nextInt();
int x2 = in.nextInt();
int k2 = in.nextInt();
BigInteger v1 = repeat(x1,k1);
BigInteger v2 = repeat(x2,k2);
int num = v1.compareTo(v2);
if (num < 0)
System.out.println("Less");
else if (num > 0)
System.out.println("Greater");
else
System.out.println("Equal");
}
public static BigInteger repeat(int x, int k){
String str = Integer.toString(x);
StringBuffer sb = new StringBuffer();
for (int i = 0; i < k; i++) {
sb.append(str);
}
BigInteger num = new BigInteger(sb.toString());
return num;
}
}