#include <bits/stdc++.h>
using namespace std;
int C[4];
void solve() {
  int cnt = 0;
  bool allpos = true;
  for (int i = 0; i < (int)3; ++i)
    if (C[i] <= 0) allpos = false;
  for (int i = 0; i < (int)4; ++i) {
    cnt += (C[i] & 1);
  }
  if (cnt == 4 || cnt == 0 || cnt == 1) {
    cout << "YES" << endl;
  } else if (cnt == 2) {
    cout << "NO" << endl;
  } else if (cnt == 3) {
    if (allpos)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    for (int i = 0; i < (int)4; ++i) cin >> C[i];
    solve();
  }
  return 0;
}
