function Main (input) {
  input = input.split("\n").map(Number);
  var A = input[0];
  var B = input[1];
  var ans;
  if (A > B) {
    ans = "GREATER";
  }
  else if (B > A) {
    ans = "LESS";
  }
  else if (A == B) {
    ans = "EQUAL";
  }
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));