#include <bits/stdc++.h>
using namespace std;
void LusiZhao() {
  long long r, g, b, w;
  cin >> r >> g >> b >> w;
  long long ans = r % 2 + g % 2 + b % 2 + w % 2;
  if (ans <= 1)
    cout << "Yes" << endl;
  else {
    if (!r || !g || !b)
      cout << "No" << endl;
    else {
      r--;
      g--;
      b--;
      w += 3LL;
      ans = r % 2 + g % 2 + b % 2 + w % 2;
      if (ans <= 1)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    LusiZhao();
  }
  return 0;
}
