function Main(input){
    input=input.split("\n");  //ここまで必須
    var point=0;
    inputA=input[1].split(" ");
    for (i=inputA[1];i>parseInt(inputA[0])-1;i--){
        if (i%input[0]==0){point=point+1}
    }
    if (point>0){console.log("OK")} else {console.log("NG")}
}

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