program main implicit none integer::N,M,X,Y integer::i,small,big,mirror read *,N,M read *,X,Y small=MIN(X,Y) big =X+Y-small mirror = 2*(small/M-1)*M-small + 1 if((MOD(big-small,2*M).eq.0).or. & (MOD(big-mirror,2*M).eq.0) ) then print '(a)', "YES" else print '(a)', "NO" end if end program main