#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, z;
  cin >> n;
  cout << "YES\n";
  while (n--) {
    cin >> x >> y >> z >> z;
    cout << ((x & 1) * 2 + (y & 1) + 1) << '\n';
  }
}
