#include <bits/stdc++.h>
using namespace std;
const int Inf = 0x7fffffff;
const int maxn = 1e5 + 5;
const double eps = 1e-10;
int n;
int main() {
  while (cin >> n) {
    int a, b, c, d;
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cin >> a >> b >> c >> d;
      cout << 2 * (a & 1) + (b & 1) + 1 << endl;
    }
  }
  return 0;
}
