#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;
    long long even = 0, odd = 0;
    if (r % 2 == 0) even++;
    if (g % 2 == 0) even++;
    if (b % 2 == 0) even++;
    if (w % 2 == 0) even++;
    if (g % 2 != 0) odd++;
    if (r % 2 != 0) odd++;
    if (b % 2 != 0) odd++;
    if (w % 2 != 0) odd++;
    if (odd <= 1)
      cout << "Yes\n";
    else if (even <= 1 && r != 0 && b != 0 && g != 0)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
