#include <bits/stdc++.h>
using namespace std;
int main() {
  puts("YES");
  int t;
  scanf("%d", &t);
  while (t--) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    printf("%d\n", (((x1 & 1) << 1) | (y1 & 1)) + 1);
  }
  return 0;
}
