#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
void solve() {
  long long int a[4];
  for (int i = 0; i < (4); i++) cin >> a[i];
  int cnt = 0;
  for (int i = 0; i < (4); i++) {
    if (a[i] & 1) cnt++;
  }
  if (cnt <= 1) {
    cout << "Yes"
         << "\n";
  } else {
    for (int i = 0; i < (3); i++) {
      a[i]--;
    }
    a[3] += 3;
    for (int i = 0; i < (4); i++) {
      if (a[i] < 0) {
        cout << "No"
             << "\n";
        return;
      }
    }
    cnt = 0;
    for (int i = 0; i < (4); i++) {
      if (a[i] & 1) cnt++;
    }
    if (cnt <= 1) {
      cout << "Yes"
           << "\n";
    } else {
      cout << "No"
           << "\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int t;
  cin >> t;
  while (t--) solve();
}
