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