#include <bits/stdc++.h>
using namespace std;
long long T, r, g, b, w;
int main() {
  scanf("%lld", &T);
  for (long long i = 0; i < T; i++) {
    scanf("%lld%lld%lld%lld", &r, &g, &b, &w);
    int cnt = (r % 2) ? 1 : 0;
    cnt += (g % 2) ? 1 : 0;
    cnt += (b % 2) ? 1 : 0;
    if (cnt == 1) {
      if ((w % 2) == 0)
        printf("Yes\n");
      else
        printf("No\n");
    } else if (cnt == 2) {
      if ((w % 2) == 0)
        printf("No\n");
      else {
        if (r > 0 && g > 0 && b > 0)
          printf("Yes\n");
        else
          printf("No\n");
      }
    } else
      printf("Yes\n");
  }
  return 0;
}
