#include <bits/stdc++.h>
using namespace std;
bool check(int a, int b, int c, int d) {
  if (a < 0 || b < 0 || c < 0 || d < 0) return 0;
  int cnt = (a % 2 == 1) + (b % 2 == 1) + (c % 2 == 1) + (d % 2 == 1);
  return cnt <= 1;
}
void solve() {
  int r, g, b, w;
  cin >> r >> g >> b >> w;
  if (check(r, g, b, w) || check(r - 1, g - 1, b - 1, w + 3)) {
    cout << "Yes" << '\n';
    ;
  } else {
    cout << "No" << '\n';
    ;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
