#include <bits/stdc++.h>
int main() {
  int n, a, b, c, d;
  scanf("%d", &n);
  printf("YES\n");
  while (n--) {
    scanf("%d%d%d%d", &a, &b, &c, &d);
    printf("%d\n", 2 * (abs(a) & 1) + (abs(b) & 1) + 1);
  }
}
