#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, mod = 1e9 + 7;
void solve() {
  vector<int> a(4);
  int e = 0, o = 0;
  for (int i = 0; i < 4; i++) {
    cin >> a[i];
    if (a[i] & 1) {
      o++;
    } else {
      e++;
    }
  }
  if (e >= 3 || o >= 3 && min({a[0], a[1], a[2]}) != 0) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
}
int main() {
  int tt = 1;
  cin >> tt;
  for (int tc = 1; tc <= tt; tc++) {
    solve();
  }
}
