#include #include using namespace std; int f(int m,int x){ int a1=(x-1)%(m); int a2=(x-1)/m; if(a2%2==0){ return a1+1; }else{ return m-a1; } } int main() { // your code goes here int n,m,x,y; scanf("%d %d %d %d",&n,&m,&x,&y); printf("%s\n",f(m,x)==f(m,y)?"YES":"NO"); return 0; }