#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma G++ optimize(2)
using namespace std;
inline int qi() {
  int f = 0, fu = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') fu = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    f = (f << 3) + (f << 1) + c - 48;
    c = getchar();
  }
  return f * fu;
}
inline long long ql() {
  long long f = 0;
  int fu = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') fu = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    f = (f << 3) + (f << 1) + c - 48;
    c = getchar();
  }
  return f * fu;
}
int main() {
  int T = qi();
  while (T--) {
    int a[5], co = 0, ce = 0, zero = 0;
    for (register int i = 1; i <= 4; ++i) {
      a[i] = qi();
      if (a[i] % 2 == 0)
        ce++;
      else
        co++;
    }
    bool flag = false;
    if (a[1] && a[2] && a[3]) flag = true;
    if (ce >= 3 || (co >= 3 && flag))
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
