#include <bits/stdc++.h>
using namespace std;
vector<long long int> ans;
int main() {
  ios::sync_with_stdio(false);
  long long int n;
  cin >> n;
  while (n--) {
    long long int a, b, c, d;
    cin >> a >> b >> c >> d;
    ans.push_back(2 * (a & 1) + (b & 1) + 1);
  }
  cout << "YES" << endl;
  for (long long int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  return (0);
}
