   program abc165a
      implicit none
      integer::k,a,b
      integer::i

         read *, k
         read *, a,b

         do i=a,b
            if (mod(i,k)==0) then
               print *, 'OK'
               stop
            end if
         end do

         print *, 'NG'

   end program abc165a