program main
  
  implicit none
  integer :: k, a, b,i,n 
  
  read(*,*) k 
  read(*,*) a, b
  
  n = 0
  do i = a, b
    if( mod(i,k) == 0 ) n = n + 1
  end do
   
  if( n > 0 ) then
    print*, "OK"
  else
    print*, "NG"
  end if

end program main
