#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 2e5 + 5;
long long n, m, x, y, p, q, k, c, ans, res;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long r, b, g, w, odd = 0;
    cin >> r >> g >> b >> w;
    if ((r % 2) != 0) odd++;
    if ((g % 2) != 0) odd++;
    if ((b % 2) != 0) odd++;
    long long minn = min(r, g);
    minn = min(minn, b);
    if (odd == 3) {
      if (minn >= 1) {
        cout << "YES" << endl;
        continue;
      } else {
        cout << "NO" << endl;
        continue;
      }
    } else if (odd == 2) {
      if (r == 0 || g == 0 || b == 0) {
        cout << "NO" << endl;
        continue;
      } else if (minn >= 1 && w % 2 != 0) {
        cout << "YES" << endl;
        continue;
      } else {
        cout << "NO" << endl;
        continue;
      }
    } else if (odd == 1) {
      if (w % 2 == 0) {
        cout << "YES" << endl;
        continue;
      } else {
        cout << "NO" << endl;
        continue;
      }
    } else {
      cout << "YES" << endl;
      continue;
    }
  }
}
