let K = Int(readLine()!)!
let b = readLine()!
let c = b.split(separator: " ")
let A = Int(c[0])!
let B = Int(c[1])!
for i in A...B {
    if i % K == 0 {
        print("OK")
        break
    }
    if i == B + 1 {
        print("NG")
    }
}