#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x1, y1, x2, y2;
  scanf("%d", &n);
  puts("YES");
  while (n--) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    x1 = abs(x1);
    y1 = abs(y1);
    if (x1 % 2 == 1 && y1 % 2 == 1)
      puts("1");
    else if (x1 % 2 == 0 && y1 % 2 == 1)
      puts("2");
    else if (x1 % 2 == 1 && y1 % 2 == 0)
      puts("3");
    else
      puts("4");
  }
  return 0;
}
