import Foundation

let a = readLine()!
let b = readLine()!.components(separatedBy: " ")


var i = Int(b[0])!

var isCheck: Bool = false

//if (Int(a)! == 1) {
  //isCheck = true
//}

while i < Int(b[1])! + 1 {
  
  if (i % Int(a)! == 0) {
    isCheck = true
  }
  i += 1 
}

isCheck ? print("OK") : print("NG")