#include using namespace std; typedef long long ll; #define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i) #define ALL(v) (v).begin(),(v).end() #define CLR(t,v) memset(t,(v),sizeof(t)) templateostream& operator<<(ostream& os,const pair&a){return os<<"("<void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<void chmin(T&a,const T&b){if(a>b)a=b;} templatevoid chmax(T&a,const T&b){if(a> N >> xLB >> xRB; REP(i, N) { cin >> x1[i] >> y1[i] >> x2[i] >> y2[i]; for (int x = x1[i]; x <= x2[i]; x++) if (0 <= x && x <= 1280) { t[x][min(y2[i], 1680)] = true; } } REP(e, N) { bool hit = false; for (int x = x1[e]; x <= x2[e]; x++) if (xLB <= x && x <= xRB) { bool no = false; for (int y = y2[e] + 1; y <= 1680; y++) { if (t[x][y]) { no = true; break;} } if (!no) hit = true; } cout << (hit ? 1 : 0) << endl; } return 0; } int main() { for (;!cin.eof();cin>>ws) main2(); return 0; }