#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
void add(long long &x, long long y) {
  x += y;
  if (x >= MOD) x -= MOD;
  if (x < 0) x += MOD;
}
void solve() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  long long mn = min({a, b, c});
  long long x = 0;
  ;
  if (a & 1) x++;
  if (b & 1) x++;
  if (c & 1) x++;
  if (d & 1) x++;
  bool ok = 0;
  if (x < 2) ok = 1;
  x = 0;
  if (mn != 0) {
    a -= 1;
    b -= 1;
    c -= 1;
    d -= 3;
    if (a & 1) x++;
    if (b & 1) x++;
    if (c & 1) x++;
    if (d & 1) x++;
    if (x < 2) ok = 1;
  }
  if (ok == 0)
    cout << "No" << '\n';
  else
    cout << "Yes" << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(12);
  long long T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
  return 0;
}
