#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500100;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  cout << "YES\n";
  int x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    cin >> x >> y;
    x = abs(x);
    y = abs(y);
    if (x % 2 == 1 && y % 2 == 1) {
      cout << "1\n";
    } else if (x % 2 == 1 && y % 2 == 0) {
      cout << "2\n";
    } else if (x % 2 == 0 && y % 2 == 1) {
      cout << "3\n";
    } else if (x % 2 == 0 && y % 2 == 0) {
      cout << "4\n";
    }
  }
}
