let len = Scanf.scanf "%d\n" (
        fun k -> 
                Scanf.scanf "%d %d" (
                        fun a b -> 
                                List.range a `To b
                                |> List.filter (fun x -> x mod k = 0)
                )
) |> List.length

let () = Printf.printf "%s\n" (if len = 0 then
                                       "NG"
                               else
                                       "OK"
                              )
