#include <bits/stdc++.h>
using namespace std;
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int color(int x, int y) {
  if (x % 2 == 0) {
    if (y % 2 == 0) return 1;
    return 2;
  }
  if (y % 2 == 0) return 3;
  return 4;
}
int main() {
  printf("YES\n");
  int n;
  scanf("%d", &n);
  while (n--) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    printf("%d\n", color(x1, y1));
  }
  return 0;
}
