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