text: /**
  https://codeforces.com/contest/1395/problem/A
  */
  #include<bits/stdc++.h>
  using namespace std;
  
  #include <ext/pb_ds/assoc_container.hpp>
  #include <ext/pb_ds/tree_policy.hpp>
  using namespace __gnu_pbds;
  
  #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
  #define ll long long
  #define fastoi  ios::sync_with_stdio(0); cin.tie(0);
  #define printNPrecision(afterDigit,value) cout << fixed << setprecision(12) << value <<endl;
  #define llu unsigned long long
  #define lld long long
  #define U unsigned int
  
  
  #define LSOne(S) (S & (-S))
  #define isBitSet(S, i) ((S >> i) & 1)
  
  const int MOD = 1000000007;
  const int MAX = 1000005;
  
  
  void solve(){
      int r,g,b,w , cnt = 0;
      cin>>r>>g>>b>>w;
      if(r%2) cnt++;
      if(g%2) cnt++;
      if(b%2) cnt++;
      if(w%2) cnt++;
  
      if(cnt<=1){
          cout<<"YES"<<endl;
      }
      else{
          r--;
          g--;
          b--;
          w+=3;
          cnt = 0;
          if(r%2) cnt++;
          if(g%2) cnt++;
          if(b%2) cnt++;
          if(w%2) cnt++;
          if(r>=0 && g>=0 && b>=0 && cnt<=1){
              cout<<"YES"<<endl;
          }else{
              cout<<"NO"<<endl;
          }
      }
  
  
  }
  
  
  int main()
  {
      fastoi ;
      int t;
      cin>>t;
      while(t--)
          solve();
  
      return 0;
  }
  