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)
    
    solve(0, k, a, b)
    |> IO.puts()
  end
  
  def solve(i, k, a, b) when i * k < a, do: solve(i + 1, k, a, b)
  def solve(i, k, a, b) when a <= i * k and i * k <= b, do: "OK"
  def solve(i, k, a, b) when b < i * k, do: "NG"
end
