import Foundation
var k = Int(readLine()!)!
var str = readLine()!.components(separatedBy:" ")
var num = [Int]()
for i in str {
  num.append(Int(i)!)
}
var a = num[0]
var b = num[1]
var ans = "NG"
for n in a...b{
  if n%k == 0{
    ans="OK"
    break
  }
}
print(ans)