fun main() = abc165a()

@OptIn(ExperimentalStdlibApi::class)
fun abc165a() {
    val k = readLine()!!.toInt()
    val (a, b) = readLine()!!.split(' ').map { it.toInt() }

    val list = (1..2000).map { it * k }

    val answer = if (list.any { it in a..b }) "OK" else "NG"

    println(answer)
}
