#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, i;
  cin >> t;
  for (i = 0; i < t; i++) {
    long long int r, g, b, w;
    cin >> r >> g >> b >> w;
    if (r % 2 == 0 && g % 2 == 0 && b % 2 == 0)
      cout << "Yes";
    else if (r % 2 != 0) {
      if (g % 2 == 0 && b % 2 == 0 && w % 2 == 0)
        cout << "Yes";
      else if (w % 2 == 0) {
        if (g % 2 != 0 && b % 2 != 0)
          cout << "Yes";
        else
          cout << "No";
      } else {
        if ((g % 2 == 0 && b % 2 == 0) || g == 0 || b == 0)
          cout << "No";
        else
          cout << "Yes";
      }
    } else if (g % 2 != 0) {
      if (r % 2 == 0 && b % 2 == 0 && w % 2 == 0)
        cout << "Yes";
      else if (w % 2 == 0) {
        if (r % 2 != 0 && b % 2 != 0)
          cout << "Yes";
        else
          cout << "No";
      } else {
        if ((r % 2 == 0 && b % 2 == 0) || r == 0 || b == 0)
          cout << "No";
        else
          cout << "Yes";
      }
    } else {
      if (g % 2 == 0 && r % 2 == 0 && w % 2 == 0)
        cout << "Yes";
      else if (w % 2 == 0) {
        if (g % 2 != 0 && r % 2 != 0)
          cout << "Yes";
        else
          cout << "No";
      } else {
        if ((g % 2 == 0 && r % 2 == 0) || g == 0 || r == 0)
          cout << "No";
        else
          cout << "Yes";
      }
    }
    cout << "\n";
  }
  return 0;
}
