#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 5;
int t, a[5];
int main() {
  cin >> t;
  while (t--) {
    int flag = 0, flag2 = 0;
    int cnt1 = 0, cnt0 = 0;
    for (int i = 1; i <= 4; i++) {
      scanf("%d", &a[i]);
      if (i < 4) {
        if (a[i] % 2) cnt1++;
        if (a[i] == 0) flag2 = 1;
      }
    }
    if (flag2) {
      if (cnt1 == 1 && a[4] % 2 == 1)
        printf("No\n");
      else if (cnt1 == 2)
        printf("No\n");
      else
        printf("Yes\n");
      continue;
    }
    if (cnt1 == 1 && a[4] % 2 == 1)
      flag = 1;
    else if (cnt1 == 2 && a[4] % 2 == 0)
      flag = 1;
    if (!flag)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
