#include <bits/stdc++.h>
using namespace std;
namespace io {
const int L = (1 << 19) + 1;
char ibuf[L], *iS, *iT, c;
int f;
char gc() {
  if (iS == iT) {
    iT = (iS = ibuf) + fread(ibuf, 1, L, stdin);
    return iS == iT ? EOF : *iS++;
  }
  return *iS++;
}
template <class I>
void gi(I& x) {
  for (f = 1, c = gc(); c < '0' || c > '9'; c = gc())
    if (c == '-') f = -1;
  for (x = 0; c <= '9' && c >= '0'; c = gc()) x = x * 10 + (c & 15);
  x *= f;
}
};  // namespace io
using io::gc;
using io::gi;
int n, a, b, c, d;
int main() {
  gi(n);
  puts("YES");
  while (n--) {
    gi(a);
    gi(b);
    gi(c);
    gi(d);
    printf("%d\n", (a & 1) * 2 + (b & 1) + 1);
  }
  return 0;
}
