import Foundation

let K = readLine()!
let input = readLine()!

let nums = input.components(separatedBy: " ")
let KInt = Int(K)!

let a = Int(nums[0])!
let b = Int(nums[1])!

for i in a...b {
    if i % KInt == 0{
        print("OK")
        break
    } else if i == b {
        print("NG")
    }
}