#include <bits/stdc++.h>
int main() {
  int t, r, g, b, w;
  scanf("%d\n", &t);
  for (int i = 0; i < t; i += 1) {
    scanf("%d %d %d %d", &r, &g, &b, &w);
    if ((r + g + b + w) % 2 == 0) {
      if ((r % 2 == 0) && (g % 2 == 0) && (b % 2 == 0) && (w % 2 == 0)) {
        printf("Yes\n");
      } else if ((r % 2 == 1) && (g % 2 == 1) && (b % 2 == 1) && (w % 2 == 1)) {
        printf("Yes\n");
      } else {
        printf("No\n");
      }
    } else {
      if ((r % 2) + (g % 2) + (b % 2) + (w % 2) == 1) {
        printf("Yes\n");
      } else if (((r % 2) + (g % 2) + (b % 2) + (w % 2) == 3) && r != 0 &&
                 g != 0 && b != 0) {
        printf("Yes\n");
      } else {
        printf("No\n");
      }
    }
  }
}
