open System

[<EntryPoint>]
let main argv =
    let K = stdin.ReadLine() |> int
    let [|A; B|] = stdin.ReadLine().Split() |> Array.map int

    let range = [|A..B|]
    let count = range |> Array.filter(fun x -> x % K = 0) |> Array.length
    if count > 0 then "OK" else "NG"
    |> printfn "%s"

    0