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