#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e5;
int t, r, g, b, w;
bool odd_count(int a, int b, int c, int d) {
  if (a % 2 + b % 2 + c % 2 + d % 2 > 1)
    return false;
  else
    return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    cin >> r >> g >> b >> w;
    int ans = 0;
    if (odd_count(r, g, b, w))
      ans = 1;
    else if (b > 0 && g > 0 && r > 0 && odd_count(r - 1, b - 1, g - 1, w + 3))
      ans = 1;
    if (ans)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
