#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int cnt_ganjil = 0, a;
    bool can_change = 1;
    for (int i = 0; i < 4; i++) {
      cin >> a;
      if (a & 1) ++cnt_ganjil;
      if (!a && i != 3) can_change = 0;
    }
    if ((cnt_ganjil > 1 && !can_change) || cnt_ganjil == 2)
      cout << "No\n";
    else
      cout << "Yes\n";
  }
}
