#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, d;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  cout << "YES" << endl;
  while (n--) {
    cin >> a >> b >> c >> d;
    int jg = abs(a) % 2 + 2 * (abs(b) % 2);
    cout << jg + 1 << endl;
  }
  return 0;
}
