def a(x):x%=2*M;return[x,M+1-x][x>M] I=lambda:map(int,raw_input().split()) N,M=I();X,Y=I() print["NO","YES"][a(X)==a(Y)]