#include <bits/stdc++.h>
using namespace std;
const int dx[9] = {0, 1, -1, 0, 0, -1, -1, 1, 1};
const int dy[9] = {0, 0, 0, -1, 1, -1, 1, -1, 1};
const double pi = acos(-1.0);
const int N = 110;
int n;
int main() {
  puts("YES");
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x0, y0, x1, y1;
    scanf("%d", &x0), scanf("%d", &y0), scanf("%d", &x1), scanf("%d", &y1);
    if (x0 < 0) x0 = -x0;
    if (y0 < 0) y0 = -y0;
    if (x0 % 2 == 1 && y0 % 2 == 1) puts("1");
    if (x0 % 2 == 1 && y0 % 2 == 0) puts("2");
    if (x0 % 2 == 0 && y0 % 2 == 1) puts("3");
    if (x0 % 2 == 0 && y0 % 2 == 0) puts("4");
  }
  return 0;
}
