
function Main(input) {
    input = input.trim();
    input = input.split("\n")
    var a = input[0].split(" ");
    var b = input[1].split(" ");

a = a.map(e=>{
    return parseInt(e);
})

b = b.map(e=>{
    return parseInt(e);
})

    var flag = false;

    for(var i=b[0];i<=b[1];i++){
        if(i%a[0]==0){
            flag = true;
            break;
        }
    }
if(flag){
    console.log("OK");
}else{
    console.log("NG");
}

}

Main(require("fs").readFileSync("/dev/stdin", "utf8")); 
