#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b, c, z;
  cin >> a >> b >> c >> z;
  long long p = 0, q = 0, r = 0, s = 0;
  if (a % 2 == 0) {
    p = 1;
  }
  if (b % 2 == 0) {
    q = 1;
  }
  if (c % 2 == 0) {
    r = 1;
  }
  if (z % 2 == 0) {
    s = 1;
  }
  if (a > 0 && b > 0 && c > 0) {
    if (p + q + r + s == 2) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
    }
  } else {
    if (p + q + r + s >= 3) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
int main() {
  long long m;
  cin >> m;
  while (m--) {
    solve();
  }
  return 0;
}
