#include <bits/stdc++.h>
using namespace std;
int f(long long r, long long g, long long b, long long w) {
  if (r % 2 + g % 2 + b % 2 + w % 2 > 1)
    return 0;
  else
    return 1;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long r, g, b, w;
    scanf("%lld%lld%lld%lld", &r, &g, &b, &w);
    if (f(r, g, b, w) == 1)
      cout << "Yes" << endl;
    else if (r > 0 && g > 0 && b > 0 && f(r - 1, g - 1, b - 1, w + 3) == 1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
