#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char a = getchar();
  for (; a > '9' || a < '0'; a = getchar())
    if (a == '-') f = -1;
  for (; a >= '0' && a <= '9'; a = getchar()) x = x * 10 + a - '0';
  return x * f;
}
int a[2][2] = {{1, 2}, {3, 4}};
int n;
int main() {
  n = read();
  cout << "YES" << endl;
  for (register int i = 1; i <= n; i++) {
    int x1 = read(), y1 = read(), x2 = read(), y2 = read();
    cout << a[x1 & 1][y1 & 1] << endl;
  }
  return 0;
}
