#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 count = 0;
    if (r % 2) count++;
    if (g % 2) count++;
    if (b % 2) count++;
    int m = min(r, min(g, b));
    bool flag;
    if (count == 0)
      flag = true;
    else if (count == 1) {
      if (w % 2 == 0)
        flag = true;
      else
        flag = false;
    } else if (count == 2) {
      if (w % 2 == 0)
        flag = false;
      else if (m > 0)
        flag = true;
      else
        flag = false;
    } else {
      flag = true;
    }
    if (flag)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
