#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll inf = INT_MAX - 1;
bool check(ll r, ll g, ll b, ll w, ll total) {
  if (r < 0 || g < 0 || b < 0 || w < 0) {
    return false;
  }
  ll numberIsOne = 0;
  if (r & 1) {
    numberIsOne++;
  }
  if (g & 1) {
    numberIsOne++;
  }
  if (b & 1) {
    numberIsOne++;
  }
  if (w & 1) {
    numberIsOne++;
  }
  if (numberIsOne == 0 && total % 2 == 0) {
    return true;
  }
  if (total % 2 == 1 && numberIsOne == 1) {
    return true;
  }
}
void solve() {
  ll r, g, b, w;
  cin >> r >> g >> b >> w;
  ll total = r + g + b + w;
  ll minNum = min(r, min(g, b));
  if (check(r, g, b, w, total)) {
    cout << "Yes\n";
    return;
  }
  if (check(r - 1, g - 1, b - 1, w + 3, total)) {
    cout << "Yes\n";
    return;
  }
  if (check(r - 2, g - 2, b - 2, w + 6, total)) {
    cout << "Yes\n";
    return;
  }
  if (check(r - minNum, g - minNum, b - minNum, w + minNum * 3, total)) {
    cout << "Yes\n";
    return;
  }
  cout << "No\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  ll t;
  cin >> t;
  while (t--) {
    solve();
  }
}
