#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x, y;
  y = scanf("%d", &x);
  return x;
}
const int N = 1;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  cout << "YES" << endl;
  for (int i = 0; i < (n); i++) {
    int x, y, x2, y2;
    cin >> x >> y >> x2 >> y2;
    int o = abs(x) % 2 * 2 + abs(y) % 2;
    cout << o + 1 << endl;
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
