#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  x *= f;
}
const int N = 2e5 + 10, maxn = 1e6 + 10;
const long long mod = 998244353;
int n, m, k, d;
int a[N];
void solve() {
  n = 4;
  m = 0;
  int flag = 1;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    if (a[i] & 1) m++;
    if (i < n - 1 && !a[i]) flag = 0;
  }
  if (m <= 1)
    puts("Yes");
  else {
    if (flag && n - m <= 1)
      puts("Yes");
    else
      puts("No");
  }
}
int main() {
  int _;
  scanf("%d", &_);
  while (_--) solve();
  return 0;
}
