#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  cout << "YES\n";
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    x = ((x % 2) + 2) % 2;
    y = ((y % 2) + 2) % 2;
    cout << 2 * x + y + 1 << "\n";
    cin >> x >> y;
  }
  return 0;
}
