#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int r, g, b, w, r1 = 0, g1 = 0, b1 = 0, w1 = 0;
    cin >> r >> g >> b >> w;
    if (r % 2 == 0) r1 = 1;
    if (g % 2 == 0) g1 = 1;
    if (b % 2 == 0) b1 = 1;
    if (w % 2 == 0) w1 = 1;
    int x = (r1 + g1 + b1 + w1);
    if (x >= 3)
      cout << "Yes" << endl;
    else if (x == 1 && r > 0 && g > 0 && b > 0)
      cout << "Yes" << endl;
    else if (x == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
