object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b = sc.next()
  if (a == b) {
    println("EQUAL")
  } else if (a.length < b.length) {
    println("LESS")
  } else if (a.length > b.length) {
    println("GREATER")
  } else if (a < b) {
    println("LESS")
  } else {
    println("GREATER")
  }
}
