#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e18;
const long long mod = (long long)1e9 + 7;
const double pi = acos(-1.0);
const double eps = (double)1e-9;
const int N = 100500;
int n;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> n;
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    int x, y, xx, yy;
    cin >> x >> y >> xx >> yy;
    x += (int)1e9;
    y += (int)1e9;
    cout << (x % 2) * 2 + (y % 2) + 1 << endl;
  }
  return 0;
}
