#include <bits/stdc++.h>
using namespace std;
int main() {
  int tt;
  cin >> tt;
  while (tt--) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int ev = 0, od = 0;
    if (a % 2 == 0)
      ev++;
    else
      od++;
    if (b % 2 == 0)
      ev++;
    else
      od++;
    if (c % 2 == 0)
      ev++;
    else
      od++;
    if (ev >= 3) {
      cout << "Yes" << endl;
      continue;
    }
    if (od == 3) {
      cout << "Yes" << endl;
      continue;
    }
    if (od == 2 && (d % 2) && (a > 0 && b > 0 && c > 0)) {
      cout << "Yes" << endl;
      continue;
    }
    if (ev == 2 && (d % 2 == 0)) {
      cout << "Yes" << endl;
      continue;
    }
    cout << "No" << endl;
  }
  return 0;
}
