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