program problemA
  implicit none

integer :: K,A,B
integer :: n, m, yr,judge


read(*,*) K
read(*,*) A,B

! if (K==1) then
!   write(*,*) 'OK'
! else
!   if (A==B) then
!     if (mod(A,K)==0) then
!       write(*,*) 'OK'
!     else
!       write(*,*) 'NG'
!     end if
!   else
!     if (int(A/K)==int(B/K)) then
!       write(*,*) 'NG'
!     else
!       write(*,*) 'OK'
!     end if
!   end if
! end if

judge=0
do n=A,B
  if (mod(n,K)==0) then
    judge=1
    exit
  end if
end do

if (judge==0) then
  write(*,*) 'NG'
else
  write(*,*) 'OK'
end if


stop
end program
