#include <bits/stdc++.h>
using namespace std;
int fun(int n) {
  int c = 0;
  if (n % 2 != 0) c++;
  return c;
}
int main() {
  int t, r, g, b, w, cnt;
  cin >> t;
  while (t--) {
    cin >> r >> g >> b >> w;
    if ((fun(r) + fun(g) + fun(b)) == 2 && (r == 0 || g == 0 || b == 0) &&
        w % 2 == 1)
      cout << "No" << endl;
    else if ((fun(r) + fun(g) + fun(b)) == 2 && w % 2 == 0)
      cout << "No" << endl;
    else if ((fun(r) + fun(g) + fun(b)) == 1 && w % 2 != 0)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
  return 0;
}
