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