import  scala.io.StdIn
object Main extends App {
  var a = StdIn.readLong()
  var b = StdIn.readLong()
  (a, b) match {
    case (a, b) if(a >  b) => println("GREATER")
    case (a, b) if(a <  b) => println("LESS")
    case (a, b) if(a == b) => println("EQUAL")
    case _ => println("")
  }
}
