function Main(input) {
    var inputs = input.split("\n");
    if (inputs[0] > inputs[1]) {
        console.log("GREATER");
    } else if (inputs[0] < inputs[1]) {
        console.log("LESS");
    } else if (inputs[0] === inputs[1]) {
        console.log("EQUAL");
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));