#include <bits/stdc++.h>
using namespace std;
void solve() {
  vector<long long> arr(4);
  for (int i = 0; i < 4; i++) cin >> arr[i];
  int counter = 0;
  for (int i = 0; i < 4; i++) counter += arr[i] % 2;
  if (counter == 0 || counter == 1 || counter == 4) {
    cout << "Yes\n";
    return;
  } else if (counter == 3) {
    if (arr[0] != 0 && arr[1] != 0 && arr[2] != 0)
      cout << "Yes\n";
    else
      cout << "No\n";
  } else
    cout << "No\n";
  return;
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
