#include <bits/stdc++.h>
using namespace std;
bool check(int r, int g, int b, int w) {
  int result = (r % 2) + (b % 2) + (g % 2) + (w % 2);
  return result <= 1;
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int r, g, b, w;
    cin >> r >> g >> b >> w;
    if (check(r, g, b, w)) {
      cout << "YES\n";
    } else if (r > 0 && b > 0 && g > 0 && check(r - 1, g - 1, b - 1, w + 1)) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
