#include <bits/stdc++.h>
using namespace std;
const long double CHANGE = 1e-8;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
int main() {
  puts("YES");
  int n;
  scanf("%d", &n);
  while (n--) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    int ans = 0;
    if (abs(min(x1, x2)) % 2) ans ^= 1;
    if (abs(min(y1, y2)) % 2) ans ^= 2;
    printf("%d\n", ans + 1);
  }
}
