#include using namespace std; int main(){ int N,M,X,Y; cin>>N>>M>>X>>Y; X%=2*M; Y%=2*M; if(X>M){ X=2*M-X+1; } if(Y>M){ Y=2*M-Y+1; } //cout<