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