module practiceA
  sub Main(ByVal args() as String)
    dim K as Integer
    dim A as Integer
    dim B as Integer
    K = Console.ReadLine()
    dim arr as String()
    arr=Split(Console.ReadLine())
    A=arr(0)
    B=arr(1)
    Console.WriteLine(if(can(k,a,b),"OK","NG"))
  end sub
  
  function can(k,a,b) as boolean
      dim n as integer
      for n = 1 to 1001
          if n*k >= a and n*k <= b then
              can = true
              exit function
          end if
      next
      can = false
  end function
end module