#include <bits/stdc++.h>
using namespace std;
void solve() {
  int r, g, b, w;
  cin >> r >> g >> b >> w;
  if ((r % 2 == 0 && g % 2 == 0 && b % 2 == 0 && w % 2 == 0) ||
      (r % 2 == 1 && g % 2 == 0 && b % 2 == 0 && w % 2 == 0) ||
      (r % 2 == 0 && g % 2 == 1 && b % 2 == 0 && w % 2 == 0) ||
      (r % 2 == 0 && g % 2 == 0 && b % 2 == 1 && w % 2 == 0) ||
      (r % 2 == 0 && g % 2 == 0 && b % 2 == 0 && w % 2 == 1)) {
    cout << "Yes" << endl;
    return;
  }
  --r;
  --g;
  --b;
  ++w;
  if (r < 0 || g < 0 || b < 0) {
    cout << "No" << endl;
    return;
  }
  if ((r % 2 == 0 && g % 2 == 0 && b % 2 == 0 && w % 2 == 0) ||
      (r % 2 == 1 && g % 2 == 0 && b % 2 == 0 && w % 2 == 0) ||
      (r % 2 == 0 && g % 2 == 1 && b % 2 == 0 && w % 2 == 0) ||
      (r % 2 == 0 && g % 2 == 0 && b % 2 == 1 && w % 2 == 0) ||
      (r % 2 == 0 && g % 2 == 0 && b % 2 == 0 && w % 2 == 1)) {
    cout << "Yes" << endl;
    return;
  }
  cout << "No" << endl;
  return;
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
