#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, a, b;
  cout << "YES\n";
  cin >> n;
  while (n--) {
    cin >> x >> y >> a >> b;
    cout << (abs(2 * (x % 2)) + abs(y % 2)) + 1 << endl;
  }
  return 0;
}
