#include #include #include #include #include #include using namespace std; typedef __int64 LL; const LL mod =4294967296LL; int n; LL l,r,a,b,c,d; bool judge() { LL L=l,R=r; LL ml=l,mr=r; if(ml>mr) swap(ml,mr); bool ok=0; for(int i=1;iR) ok=1; if(ok) swap(L,R); ml=max(L,ml); mr=min(R,mr); if(ok) swap(L,R); ok=0; } L=l;R=r; if(L>R) ok=1; if(ok) swap(L,R); if(L>mr&&RR) ok=1; if(ok) swap(L,R); if(L>mr&&R