fun main(args: Array<String>) {
    val baisu = next().toInt()
    val lange = nextIntList()
    var res = "NG"
    for(i in lange[0] .. lange[1]){
        if(i % baisu == 0){
            res = "OK"
            break
        }
    }
    println(res)
}
fun nextIntList() = next().split(" ").map{ it.toInt() }
fun next() = readLine()!!