const main = stdin => {
  const input = stdin.trim().split('\n')
  const A = input[0]
  const B = input[1]

  if (A > B) {
    console.log('GREATER')
  } else if (A < B) {
    console.log('LESS')
  } else {
    console.log('EQUAL')
  }
}


// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
