#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int t = 1, i;
  cin >> t;
  while (t--) {
    int r, g, b, w;
    cin >> r >> g >> b >> w;
    vector<int> a(4);
    if (r % 2 == 0) {
      a[0] = 1;
    }
    if (g % 2 == 0) {
      a[1] = 1;
    }
    if (b % 2 == 0) {
      a[2] = 1;
    }
    if (w % 2 == 0) {
      a[3] = 1;
    }
    int counte = 0;
    counte += (a[0] + a[1] + a[2] + a[3]);
    if (counte >= 3) {
      cout << "Yes" << endl;
      continue;
    } else if (r > 0 && g > 0 && b > 0) {
      counte = 4 - counte;
      if (counte >= 3) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
