#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tc;
  cin >> tc;
  while (tc--) {
    long long r, g, b, w;
    cin >> r >> g >> b >> w;
    long long min1 = min({r, g, b});
    long long res = (r % 2) + (g % 2) + (b % 2) + (w % 2);
    if (res == 4 || res == 3) {
      if (min1 > 0)
        cout << "Yes\n";
      else
        cout << "No\n";
    } else if (res == 2)
      cout << "No\n";
    else
      cout << "Yes\n";
  }
}
