      PROGRAM piyo
      IMPLICIT NONE
      integer :: a,b,k,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