fun main(arr:Array<String>) {
    val ab = (1..2).map { readLine()!! }
    val len = ab.map { it.length }.max()!!
    var fixAB = ab.map { (0 until (len - it.length)).joinToString(""){"0"} + it }
    if(fixAB[0] > fixAB[1]) {
        println("GREATER")
    } else if(fixAB[0] < fixAB[1]) {
        println("LESS")
    } else {
        println("EQUAL")
    }
}