#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x1, x2, y1, y2;
  cin >> n;
  cout << "YES\n";
  while (n--) {
    cin >> x1 >> y1 >> x2 >> y2;
    cout << ((x1 & 1) * 2 + (y1 & 1) + 1) << endl;
  }
  return 0;
}
