#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, d, odd = 0, even = 0;
    bool ans = false;
    cin >> a >> b >> c >> d;
    if (a % 2 == 1)
      odd++;
    else
      even++;
    if (b % 2 == 1)
      odd++;
    else
      even++;
    if (c % 2 == 1)
      odd++;
    else
      even++;
    if (d % 2 == 1)
      odd++;
    else
      even++;
    if (odd <= 1) ans = true;
    a--;
    b--;
    c--;
    d += 3;
    odd = 0;
    even = 0;
    if (a >= 0 && b >= 0 && c >= 0) {
      if (a % 2 == 1)
        odd++;
      else
        even++;
      if (b % 2 == 1)
        odd++;
      else
        even++;
      if (c % 2 == 1)
        odd++;
      else
        even++;
      if (d % 2 == 1)
        odd++;
      else
        even++;
      if (odd <= 1) ans = true;
    }
    if (ans)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
