let k = Int(readLine()!)!
let ab = readLine()!.split(separator: " ").map { Int($0)! }
for i in ab[0]...ab[1] {
  if i.isMultiple(of: k) {
    print("OK")
    break
  } else if i == ab[1] {
    print("NG")
  }
}