#include <bits/stdc++.h>
using namespace std;
int n, x, y;
int main() {
  cin >> n;
  cout << "YES\n";
  for (int i = 1; i <= n; i++) {
    cin >> x >> y >> x >> y;
    x += (int)(1e9 + 7);
    y += (int)(1e9 + 7);
    cout << 1 + x % 2 + 2 * (y % 2) << endl;
  }
  return 0;
}
