import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val a = sc.next.toInt
    val b = sc.next.toInt
    if (a == b) println("EQUAL")
    else if (a > b) println("GREATER")
    else println("LESS")
  }
}
