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