defmodule Main do
  def main do
    k = 
    IO.gets("")
    |> String.trim()
    |> String.to_integer()
    
    [a, b] = 
    IO.gets("")
    |> String.trim()
    |> String.split()
    |> Enum.map(&String.to_integer/1)
    
    if rem(b - a, k) < k, do: IO.puts("OK"), else: IO.puts("NG")
  end
end