#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int INF = 1e9;
const double EPS = 1e-8;
int main() {
  int n;
  scanf("%d", &(n));
  int a, b, c, d;
  puts("YES");
  for (int i = 1; i <= n; i++) {
    scanf("%d", &(a)), scanf("%d", &(b));
    scanf("%d", &(c)), scanf("%d", &(d));
    if (a & 1 && b & 1)
      cout << 1 << endl;
    else if (a & 1 && !(b & 1))
      cout << 2 << endl;
    else if (!(a & 1) && b & 1)
      cout << 3 << endl;
    else
      cout << 4 << endl;
  }
}
