
fun main(args:Array<String>) {
    val num = (1..2).map { readLine()!! }
    val maxLen = num.map { it.length }.max()!!
    val (a,b) = num.map { it.padStart(maxLen, '0') }
    if(a > b) {
        println("GREATER")
    } else if(a < b) {
        println("LESS")
    } else {
        println("EQUAL")
    }
}
