"use strict";
    
const main = arg => {
    arg = arg.split("\n");
    const A = parseInt(arg[0]);
    const B = parseInt(arg[1]);
    
    if(A === B) {
        console.log("EQUAL");
        return;
    }
    
    console.log(A > B ? "GREATER" : "LESS");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));