#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(int i=(N-1); i>=n; i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>N>>xLB>>xRB; REP(i,0,1300){ front[i]=-inf; } REP(i,0,N){ cin>>XL[i]>>YU[i]>>XR[i]>>YD[i]; REP(j,max(xLB,XL[i]),min(xRB,XR[i])+1){ if(front[j]