#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238;
const double EPS = 1e-6;
void solve() {
  long long r, g, b, w;
  cin >> r >> g >> b >> w;
  long long total = r + g + b + w;
  long long odd = 0;
  odd = r % 2 + g % 2 + b % 2 + w % 2;
  long long col = r && g && b;
  if (odd <= 1 || odd == 4 || (odd == 3 && col))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long tc;
  cin >> tc;
  while (tc--) {
    solve();
  }
  return 0;
}
