#include <bits/stdc++.h>
using namespace std;
int n, x, y, ans;
int main() {
  printf("YES\n");
  scanf("%d", &n);
  while (n--) {
    scanf("%d%d", &x, &y);
    x = abs(x);
    y = abs(y);
    if (x % 2) ans += 2;
    if (y % 2) ans += 1;
    printf("%d\n", ans + 1);
    ans = 0;
    scanf("%d%d", &x, &y);
  }
}
