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