#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  cout << "YES" << endl;
  int a, b, c, d;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    cout << 2 * (abs(a) % 2) + abs(b) % 2 + 1 << " ";
  }
}
