#include <bits/stdc++.h>
using namespace std;
long long arr[1000009];
long long brr[1000009];
long long idx[1000009];
long long st[1000009];
int main() {
  long long n;
  cin >> n;
  cout << "YES\n";
  while (n--) {
    int x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    cout << 2 * (abs(x1) % 2) + (abs(y1) % 2) + 1 << endl;
  }
  return 0;
}
