


fun main(args : Array<String>){
    var k: String = readLine()!!
    var (a,b)=readLine()!!.split(" ").map(String::toInt)
    var flag: String? = null
    for (i in a..b){
        if ((i % k.toInt()) == 0){
            flag = "OK"
            break
        }
    }
	print(flag ?: "NG")
}