  import java.util.Scanner
  
  import scala.collection.immutable.Range.BigInt
  
  
  object Main {
    def main(args: Array[String]): Unit = {
      val sc = new Scanner(System.in)
      val a, b = sc.nextBigInteger()
      
      val ans = if (a.compareTo(b)==1) "GREATER" else if (a.equals(b)) "EQUAL" else "LESS"
      
      println(ans)
    }
    
    def printArray[T](arr: Array[T]): Unit = {
      for (i <- arr.indices) {
        print(s"${arr(i)} ")
      }
      println()
    }
  }
