fun main(args:Array<String>) {
    val a = readLine()!!
    val b = readLine()!!
    var aPad = a.padStart(Math.max(a.length, b.length), '0')
    var bPad = b.padStart(aPad.length, '0')
    if(aPad== bPad) {
        println("EQUAL")
    } else if(aPad > bPad) {
        println("GREATER")
    } else {
        println("LESS")
    }

}
