#include<bits/stdc++.h> using namespace std; const int maxn=1e5+5; int solve[maxn]; int myMin,myMax; int n,m,a,b; int main() { while( ~scanf("%d%d%d%d",&n,&m,&a,&b) ) { //使得a<=b if( a>b ) { swap(a,b); } myMi...