defmodule Main do
  def main do
    k =
      IO.read(:line)
      |> String.trim()
      |> String.to_integer()
 
    [a, b] =
      IO.read(:line)
      |> String.trim()
      |> String.split()
      |> Enum.map(&String.to_integer/1)
 
    s =
      if(Enum.any?(a..b, fn x -> rem(x, k) === 0 end)) do
        "OK"
      else
        "NG"
      end
 
    IO.puts(s)
  end
end