#include "bits/stdc++.h" #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } using namespace std; int main() { fastcin; int N, LB, RB; int f[1281] = {-1}; int a[1281] = {-1}; cin >> N >> LB >> RB; for(int i = 0; i < N; i++) { int XL, YU, XR, YD; cin >> XL >> YU >> XR >> YD; if(XL < 0) XL = 0; if(XR > 1280) XR = 1280; if(YD > 1680) YD = 1680; for(int j = XL; j <= XR; j++) { if(f[j] < YD) { f[j] = YD; a[j] = i; } } } for(int i = 0; i < N; i++) { for(int j = 0; j < 1281; j++) { if(j >= LB && j <= RB) { if(a[j] == i) { cout << "1" << "\n"; break; } } if(j == 1200) cout << "0" << "\n"; } } return 0; }