object Main extends App {
  val inputs: Seq[String] = scala.io.Source.stdin.getLines().toList
  val a = inputs(0).toInt
  val b = inputs(1).toInt

  println(solve(a, b))

  private def solve(a: Int, b: Int): String = {
    if(a > b) {
      "GREATER"
    } else if (b < a){
      "LESS"
    } else {
      "EQUAL"
    }
  }
}