#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int r, g, b, w;
    cin >> r >> g >> b >> w;
    int a[2] = {0};
    int rr = r % 2, gg = g % 2, bb = b % 2, ww = w % 2;
    int x = rr + gg + bb + ww;
    if (r > 0 && g > 0 && b > 0) {
      if (x == 2)
        cout << "No" << endl;
      else
        cout << "Yes" << endl;
    } else {
      if (x < 2)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
  }
  return 0;
}
