#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  printf("YES\n");
  int i;
  for (i = 1; i <= n; i++) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    int ret = 0;
    if (x1 % 2 != 0) {
      ret ^= 2;
    }
    if (y1 % 2 != 0) {
      ret ^= 1;
    }
    printf("%d\n", ret + 1);
  }
}
