#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cout << "YES\n";
  for (int i = 0, x, y, xx, yy, flag = 0; i < n; i++, flag = 0) {
    cin >> x >> y >> xx >> yy;
    flag |= 1 * (x % 2 == 0);
    flag |= (2 * (y % 2 == 0));
    cout << flag + 1 << '\n';
  }
  return 0;
}
