function Main(input){
  input = input.split('\n');
  var a = Number(input[0]);
  var b = Number(input[1]);

  if(a > b) {
      console.log('GREATER');
  } else if(b > a) {
    console.log('LESS');
  } else {
    console.log('EQUAL');
  }

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