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