#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int i;
  int x1, y1, x2, y2;
  int x;
  printf("YES\n");
  for (i = 1; i <= n; i++) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (x1 % 2 == 0) {
      if (y1 % 2 == 0)
        x = 1;
      else
        x = 2;
    } else {
      if (y1 % 2 == 0)
        x = 3;
      else
        x = 4;
    }
    printf("%d\n", x);
  }
  return 0;
}
