#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
  const char *comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
const char nl = '\n';
const int inf = 2e9;
const ll INF = (ll)2e18;
const ll mod = 1e9 + 7;
const int N = 2e6 + 15;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    int r, g, b, w;
    cin >> r >> g >> b >> w;
    int ok = 0;
    int allpos = 0;
    if (r > 0 and g > 0 and b > 0) allpos = 1;
    int odd = 0;
    odd += (r & 1);
    odd += (g & 1);
    odd += (b & 1);
    if ((odd == 0 or (odd == 3 and allpos))) ok = 1;
    if (odd == 1 and (w % 2 == 0)) ok = 1;
    if (allpos and odd == 2 and (w & 1)) ok = 1;
    if (ok)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
