#include <bits/stdc++.h>
using namespace std;
void io() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(15);
}
int main(int argc, char* argv[]) {
  io();
  int n;
  cin >> n;
  int a, b, c, d;
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    a = abs(a);
    b = abs(b);
    int col = (2 * (a & 1) + (b & 1)) + 1;
    cout << col << '\n';
  }
  return 0;
}
