#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, n, z = 0, f = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    z = 0;
    f = 0;
    cin >> a >> b >> c >> d;
    if (a % 2 == 1) {
      f++;
    }
    if (b % 2 == 1) {
      f++;
    }
    if (c % 2 == 1) {
      f++;
    }
    if (d % 2 == 1) {
      f++;
    }
    if ((a == 0) || (b == 0) || (c == 0)) {
      z = 1;
    }
    if ((f == 0) || (f == 1) || (f == 4)) {
      cout << "Yes";
    } else {
      if (f == 2) {
        cout << "No";
      } else {
        if (z == 1) {
          cout << "No";
        } else {
          cout << "Yes";
        }
      }
    }
    cout << "\n";
  }
}
