#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x1, y1, x2, y2;
  cin >> n;
  cout << "YES\n";
  for (long long i = 0; i < n; i++) {
    cin >> x1 >> y1 >> x2 >> y2;
    long long a = abs(x1 % 2), b = abs(y1 % 2);
    cout << a * 2 + b + 1 << "\n";
  }
}
