function Main(input) {
    let k = input.split('/')[0];
    let a = input.split('/')[1];
    let b = input.split('/')[2];

    let result = 'NG';

    for (let i = 1; k * i <= 1000; i++) {
        if (a <= (k * i) && (k * i) <= b) {
            result = 'OK';
            break;
        }
    }
    console.log(result);
}

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