program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: k,a,b,i
    
    read*, k
    read*, a,b
    do i=1,1000
        if (i*k >= a .and. i*k <= b) then
            print'(a)', 'OK'
            stop
        end if
    end do

    print'(a)', 'NG'
end program name