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