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