program main
	implicit none
    integer::a,b,k,i
    read(*,*)k
    read(*,*)a,b
    do i=a,b
    	if(mod(i,k)==0)then
        	write(*,*) 'OK'
            stop
        end if
    end do
    write(*,*)'NG'
    stop
end program main