#include #include #include #include #include #include #include #include #define FI first #define SE second #define PF push_front #define PB push_back #define PPF pop_front #define PPB pop_back #define MA make_pair #define ll long long #define PA pair #define VE vector #define VP vector #define FOR(i,a,b) for(int i=a;i=a;i--) #define YES(i) cout<<(i?"YES":"NO")<>N; cin>>LB>>RB; VP V[2000]; FOR(i,0,N){ int XL,YU,XR,YD; cin>>XL>>YU>>XR>>YD; if(XL<=0){ XL=1; } if(YU<=0){ YU=1; } if(XR>1280){ XR=1280; } if(YD>1680){ YD=1680; } FOR(j,XL,XR+1){ V[j].PB(MA(YD,i)); } } FOR(i,LB,RB+1){ sort(V[i].rbegin(),V[i].rend()); } FOR(i,LB,RB+1){ if(V[i].empty()){ continue; }else{ out[V[i][0].SE]=true; } } FOR(i,0,N){ if(out[i]){ cout<<1<