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