program main
integer :: k,a,b
logical :: ans = .false.

read(*,*)k
read(*,*)a,b

do i = a,b
if (mod(i,k) == 0) ans=.true.
end do

if (ans) then
write(*,*)'OK'
else
write(*,*)'NG'
end if
end program main