(defn abc165a [k a b]
  (if (or (> (- b a) k)
          (->> (range a (inc b))
               (map #(mod % k))
               (some zero?))) "OK"
      "NG"))

(let [k (read) [a b] [(read) (read)]]
  (println (abc165a k a b)))
