#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  cout << "YES" << endl;
  while (n--) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    a = abs(min(a, c));
    b = abs(min(b, d));
    if (a % 2 == 1 && b % 2 == 1)
      cout << "1" << endl;
    else if (a % 2 == 1 && b % 2 == 0)
      cout << "2" << endl;
    else if (a % 2 == 0 && b % 2 == 1)
      cout << "3" << endl;
    else if (a % 2 == 0 && b % 2 == 0)
      cout << "4" << endl;
  }
  return 0;
}
