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