#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 odd = r % 2 + g % 2 + b % 2 + w % 2;
    int even = 4 - odd;
    if (even == 2)
      cout << "No" << endl;
    else if (even == 4 || even == 3 || even == 0)
      cout << "Yes" << endl;
    else if (even == 1 && r != 0 && g != 0 && b != 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
