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