#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  cin >> T;
  while (T--) {
    int r, g, b, w;
    cin >> r >> g >> b >> w;
    int o = 0, e = 0;
    int t = min(r, min(g, b));
    if (r % 2)
      o++;
    else
      e++;
    if (g % 2)
      o++;
    else
      e++;
    if (b % 2)
      o++;
    else
      e++;
    if (w % 2)
      o++;
    else
      e++;
    if (o <= 1 || (e <= 1 && t > 0))
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
