#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double eps = 1E-6;
int main() {
  int x, y, a, b, n;
  while (cin >> n) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cin >> x >> y >> a >> b;
      cout << (((x & 1) << 1) | (y & 1)) + 1 << ' ';
    }
    cout << endl;
  }
  return 0;
}
