Boboniu gives you

  $r$ red balls,  $g$ green balls,  $b$ blue balls,  $w$ white balls. 

He allows you to do the following operation as many times as you want: 

  Pick a red ball, a green ball, and a blue ball and then change their color to white. 

You should answer if it's possible to arrange all the balls into a palindrome after several (possibly zero) number of described operations. 


-----Input-----

The first line contains one integer $T$ ($1\le T\le 100$) denoting the number of test cases.

For each of the next $T$ cases, the first line contains four integers $r$, $g$, $b$ and $w$ ($0\le r,g,b,w\le 10^9$).


-----Output-----

For each test case, print "Yes" if it's possible to arrange all the balls into a palindrome after doing several (possibly zero) number of described operations. Otherwise, print "No".


-----Example-----
Input
4
0 1 1 1
8 1 9 3
0 0 0 0
1000000000 1000000000 1000000000 1000000000

Output
No
Yes
Yes
Yes



-----Note-----

In the first test case, you're not able to do any operation and you can never arrange three balls of distinct colors into a palindrome.

In the second test case, after doing one operation, changing $(8,1,9,3)$ to $(7,0,8,6)$, one of those possible palindromes may be "rrrwwwbbbbrbbbbwwwrrr".

A palindrome is a word, phrase, or sequence that reads the same backwards as forwards. For example, "rggbwbggr", "b", "gg" are palindromes while "rgbb", "gbbgr" are not. Notice that an empty word, phrase, or sequence is palindrome.

Difficulty: EASY
Tags: Mathematics

Complete search
Skill types: Complete search

Starter code:

Solutions:
t = int(input())
for _ in range(t):
	(r, g, b, w) = [int(x) for x in input().split()]
	arr = [r, g, b, w]
	n = r + g + b + w
	n_odd = sum([1 for x in arr if x & 1])
	n_even = sum([1 for x in arr if x % 2 == 0])
	if n % 2 == 0 and (r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0) or (r & 1 and g & 1 and b & 1 and w & 1)):
		print('YES')
	elif n & 1 and (n_odd == 1 or (n_odd == 3 and r >= 1 and (g >= 1) and (b >= 1))):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in range(len(a)):
		if a[i] % 2 != 0:
			odd += 1
		else:
			even += 1
	if odd <= 1:
		print('Yes')
	else:
		if a[0] > 0 and a[1] > 0 and (a[2] > 0):
			a[0] -= 1
			a[1] -= 1
			a[2] -= 1
			a[3] += 3
			c = odd
			odd = even
			even = c
		if odd <= 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	mn = min(r, g, b)
	w += mn
	r -= mn
	g -= mn
	b -= mn
	ls = [r, g, b, w]
	odd = 0
	for i in ls:
		if i % 2:
			odd += 1
	if odd <= 1 or (mn > 0 and odd == 3):
		print('YES')
	else:
		print('NO')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
inst = lambda : input().decode().rstrip('\n\r')
INF = float('inf')
_T_ = inin()
for _t_ in range(_T_):
	c = inar()
	odd = 0
	even = 0
	for i in c:
		if i % 2:
			odd += 1
		else:
			even += 1
	if odd <= 1:
		print('Yes')
	elif all(c[0:3]):
		for i in range(3):
			c[i] -= 1
		c[3] += 3
		odd = 0
		even = 0
		for i in c:
			if i % 2:
				odd += 1
			else:
				even += 1
		if odd <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	m = min(r, g, b)
	if m == 0:
		s = 0
		if r % 2 == 1:
			s += 1
		if g % 2 == 1:
			s += 1
		if b % 2 == 1:
			s += 1
		if w % 2 == 1:
			s += 1
		if s > 1:
			print('NO')
		else:
			print('YES')
	else:
		s = 0
		if w % 2 == 0:
			if r % 2 == 1:
				s += 1
			if g % 2 == 1:
				s += 1
			if b % 2 == 1:
				s += 1
			if s == 2:
				print('NO')
			else:
				print('YES')
		else:
			if r % 2 == 1:
				s += 1
			if g % 2 == 1:
				s += 1
			if b % 2 == 1:
				s += 1
			if s == 1:
				print('NO')
			else:
				print('YES')


t = int(input())
for i in range(t):
	(a, b, c, d) = map(int, input().split())
	tot = a + b + c + d
	if tot % 2 == 0:
		if a % 2 == b % 2 == c % 2 == d % 2:
			print('Yes')
		else:
			print('No')
	else:
		x = a % 2 + b % 2 + c % 2 + d % 2
		if x == 1:
			print('Yes')
		elif x == 3 and a != 0 and (b != 0) and (c != 0):
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r == 0 or g == 0 or b == 0:
		first = r % 2
		second = g % 2
		third = b % 2
		if first == 0 and second == 0 and (third == 0):
			print('Yes')
		elif r == 0 and g == 0 or (r == 0 and b == 0) or (g == 0 and b == 0):
			if w % 2 == 0:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	else:
		first = r % 2
		second = g % 2
		third = b % 2
		fourth = w % 2
		val = first + second + third + fourth
		if val <= 1 or val >= 3:
			print('Yes')
		else:
			print('No')


cases = int(input())
for t in range(cases):
	(r, g, b, w) = list(map(int, input().split()))
	l = [r, g, b, w]
	odd = 0
	for i in l:
		if i % 2 == 1:
			odd += 1
	l = [r, g, b]
	zero = 0
	for i in l:
		if i == 0:
			zero += 1
	if odd == 0 or odd == 4:
		print('Yes')
	elif odd == 2:
		print('No')
	elif odd == 1:
		print('Yes')
	elif zero:
		print('No')
	else:
		print('Yes')


import sys
import math
input = sys.stdin.readline

def odd_count(A):
	return sum((a % 2 for a in A))
T = int(input())
for t in range(T):
	A = list(map(int, input().split(' ')))
	if odd_count(A) <= 1:
		print('Yes')
		continue
	if A[0] and A[1] and A[2]:
		A[0] -= 1
		A[1] -= 1
		A[2] -= 1
		A[3] += 3
		if odd_count(A) <= 1:
			print('Yes')
			continue
	print('No')


T = int(input())
for t in range(T):
	s = input()
	(a, b, c, w) = [int(i) for i in s.split()]
	r = min([a, b, c])
	odd = (a + b + c + w) % 2
	if odd:
		odds = a % 2 + b % 2 + c % 2 + w % 2
		if odds < 2:
			print('YES')
			continue
		if r:
			a -= 1
			b -= 1
			c -= 1
			w += 3
		else:
			print('NO')
			continue
		odds = a % 2 + b % 2 + c % 2 + w % 2
		if odds < 2:
			print('YES')
			continue
		print('NO')
		continue
	else:
		odds = a % 2 + b % 2 + c % 2 + w % 2
		if odds < 1:
			print('YES')
			continue
		if r:
			a -= 1
			b -= 1
			c -= 1
			w += 3
		else:
			print('NO')
			continue
		odds = a % 2 + b % 2 + c % 2 + w % 2
		if odds < 1:
			print('YES')
			continue
		print('NO')
		continue


mod = 10 ** 9 + 7
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	ch = 0
	if w % 2 == 1 and r % 2 == g % 2 == b % 2 == 0:
		ch = 1
	elif w % 2 == 0 and r % 2 + g % 2 + b % 2 <= 1:
		ch = 1
	if r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
	if w % 2 == 1 and r % 2 == g % 2 == b % 2 == 0:
		ch = 1
	elif w % 2 == 0 and r % 2 + g % 2 + b % 2 <= 1:
		ch = 1
	if ch == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for z in range(t):
	(r, b, g, w) = map(int, input().split())
	if r == 0 or g == 0 or b == 0:
		nodd = 0
		if r % 2 != 0:
			nodd = nodd + 1
		if b % 2 != 0:
			nodd = nodd + 1
		if g % 2 != 0:
			nodd = nodd + 1
		if w % 2 != 0:
			nodd = nodd + 1
		if nodd == 1 or nodd == 0:
			print('Yes')
		else:
			print('No')
		continue
	nodd = 0
	rodd = False
	godd = False
	bodd = False
	wodd = False
	if r % 2 != 0:
		nodd = nodd + 1
		rodd = True
	if b % 2 != 0:
		nodd = nodd + 1
		bodd = True
	if g % 2 != 0:
		nodd = nodd + 1
		godd = True
	if w % 2 != 0:
		nodd = nodd + 1
		wodd = True
	if nodd == 4 or nodd == 1 or nodd == 0 or (nodd == 3):
		print('Yes')
	elif nodd == 2:
		print('No')


for _ in range(int(input())):
	x = list(map(int, input().split()))
	y = sum((v & 1 for v in x))
	z = all((v > 0 for v in x[:3]))
	print('Yes' if y < 2 or (z and y > 2) else 'No')


import sys
input = sys.stdin.readline
t = int(input())
while t != 0:
	t -= 1
	(r, g, b, w) = map(int, input().split())
	s = r + g + b + w
	cnt = r % 2 + g % 2 + b % 2 + w % 2
	if cnt == 0:
		print('Yes')
	if cnt == 1:
		print('Yes')
	if cnt == 2:
		print('No')
	if cnt == 3:
		if r != 0 and g != 0 and (b != 0):
			print('Yes')
		else:
			print('No')
	if cnt == 4:
		if r != 0 and g != 0 and (b != 0):
			print('Yes')
		else:
			print('No')


for x in range(int(input())):
	(r, g, b, w) = [int(x) for x in input().split()]
	k = r % 2 + g % 2 + b % 2 + w % 2
	if k <= 1:
		print('YES')
	elif r * g * b > 0 and (r - 1) % 2 + (g - 1) % 2 + (b - 1) % 2 + (w + 3) % 2 <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	rr = r % 2
	rg = g % 2
	rb = b % 2
	rw = w % 2
	f = 0
	if r == 0 or b == 0 or g == 0:
		f = 1
	if f == 0:
		if rr + rg + rb + rw == 0 or rr + rg + rb + rw == 4 or rr + rg + rb + rw == 3 or (rr + rg + rb + rw == 1):
			print('Yes')
		else:
			print('No')
	elif rr + rg + rb + rw == 0 or rr + rg + rb + rw == 1:
		print('Yes')
	else:
		print('No')


n = int(input())

def operation(lst):
	(a, b, c, d) = (lst[0], lst[1], lst[2], lst[3])
	if a % 2 == 0 and b % 2 == 0 and (c % 2 == 0) and (d % 2 == 0):
		return 'Yes'
	oddnumber = 0
	for i in lst:
		if i % 2 != 0:
			oddnumber += 1
	if 0 in lst and lst[-1] != 0:
		if oddnumber > 1:
			return 'No'
		else:
			return 'Yes'
	if oddnumber == 1 or oddnumber == 3 or oddnumber == 4:
		return 'Yes'
	else:
		return 'No'
for i in range(n):
	lst = list(map(int, input().split()))
	print(operation(lst))


T = int(input())
for i in range(T):
	(a, b, c, d) = map(int, list(input().split(' ')))
	num_odd = a % 2 + b % 2 + c % 2 + d % 2
	move_possible = a > 0 and b > 0 and (c > 0)
	if num_odd == 2 or (num_odd > 1 and (not move_possible)):
		print('No')
	else:
		print('Yes')


import math
t = int(input())
for w in range(t):
	(r, g, b, w) = (int(i) for i in input().split())
	k = min(r, g, b)
	l = [r, g, b]
	c = 0
	for i in range(3):
		if l[i] % 2 == 1:
			c += 1
	if c == 0 or c == 3:
		print('Yes')
	elif w % 2 == 0:
		if c == 1:
			print('Yes')
		else:
			print('No')
	elif c == 1:
		print('No')
	elif k == 0:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	(r, g, b, w) = map(int, input().split())
	r1 = r % 4
	r2 = g % 4
	r3 = b % 4
	r4 = w % 4
	s = (r1 * r1 + r2 * r2 + r3 * r3 + r4 * r4) % 4
	if (r == 0 or g == 0) or b == 0:
		if s <= 1:
			print('Yes')
		else:
			print('No')
	elif s == 2:
		print('No')
	else:
		print('Yes')


t = int(input())
while t > 0:
	(r, g, b, w) = map(int, input().split())
	temp = min(r, g, b)
	r -= temp
	g -= temp
	b -= temp
	w += 3 * temp
	if (r + g + b + w) % 2 == 0:
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
			print('Yes')
		else:
			print('No')
	elif r % 2 == 1 and g % 2 == 0 and (b % 2 == 0):
		print('Yes')
	elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 0):
		print('Yes')
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 1):
		print('Yes')
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
		print('Yes')
	elif temp != 0:
		r += 1
		g += 1
		b += 1
		w -= 3
		if r % 2 == 1 and g % 2 == 0 and (b % 2 == 0):
			print('Yes')
		elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 0):
			print('Yes')
		elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 1):
			print('Yes')
		elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
			print('Yes')
		else:
			print('No')
	else:
		print('No')
	t -= 1


import sys, threading
sys.setrecursionlimit(10 ** 8)
threading.stack_size(10 ** 8)

def main():

	def isPossible():
		for _ in range(3):
			if sum((ball % 2 for ball in balls)) <= 1:
				return True
			if any((balls[i] == 0 for i in range(len(balls) - 1))):
				break
			for i in range(len(balls) - 1):
				balls[i] -= 1
			balls[-1] += 3
		return False
	t = int(input())
	for _ in range(t):
		balls = list(map(int, input().split()))
		print('Yes' if isPossible() else 'No')
threading.Thread(target=main).start()


qu = int(input())
for __ in range(qu):
	balls = list(map(int, input().split()))
	w = 1 * int(balls[3] == 0)
	zer = 0
	ev = 0
	od = 0
	for i in balls:
		if i == 0:
			zer += 1
		if i % 2 == 0:
			ev += 1
		if i % 2 == 1:
			od += 1
	if zer == 4 or zer == 3 or ev == 4 or (od == 1) or (od == 3 and zer != 1) or (od == 4) or (w == 1 and od == 3):
		print('yes')
	else:
		print('no')


T = int(input())
answer = ''
for t in range(T):
	(r, g, b, w) = map(int, input().split())
	(rr, gg, bb, ww) = (r % 2, g % 2, b % 2, w % 2)
	if rr == gg == bb == ww == 0:
		answer += 'yes\n'
		continue
	if [rr, gg, bb, ww].count(0) == 3:
		answer += 'yes\n'
		continue
	r -= 1
	g -= 1
	b -= 1
	if min(r, g, b) < 0:
		answer += 'no\n'
		continue
	w += 3
	(rr, gg, bb, ww) = (r % 2, g % 2, b % 2, w % 2)
	if rr == gg == bb == ww == 0:
		answer += 'yes\n'
		continue
	if [rr, gg, bb, ww].count(0) == 3:
		answer += 'yes\n'
		continue
	answer += 'no\n'
print(answer)


from collections import deque
from math import *
import heapq
from random import *
import sys
from copy import deepcopy

def count():
	ans = 0
	if not r % 2:
		ans += 1
	if not g % 2:
		ans += 1
	if not b % 2:
		ans += 1
	if not w % 2:
		ans += 1
	return ans
for nt in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if count() >= 3:
		print('Yes')
		continue
	if min(r, g, b) > 0:
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if count() >= 3:
			print('Yes')
		else:
			print('No')
		continue
	print('No')


N = int(input())
for i in range(N):
	(r, g, b, w) = map(int, input().split())
	r_odd = r % 2
	g_odd = g % 2
	b_odd = b % 2
	w_odd = w % 2
	if all([not i for i in [r_odd, g_odd, b_odd, w_odd]]):
		print('Yes')
	elif sum([r_odd, g_odd, b_odd, w_odd]) == 3 and r != 0 and (g != 0) and (b != 0):
		print('Yes')
	elif sum([r_odd, g_odd, b_odd, w_odd]) == 1 or sum([r_odd, g_odd, b_odd, w_odd]) == 4:
		print('Yes')
	else:
		print('No')


T = int(input())
for t in range(T):
	(a, b, c, d) = map(int, input().split())
	l = [x % 2 == 0 for x in [a, b, c, d]]
	cnt = l.count(True)
	x = 0 in [a, b, c]
	if cnt == 4:
		print('Yes')
	elif cnt == 3:
		print('Yes')
	elif cnt == 2:
		print('No')
	elif cnt == 1:
		if x:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	balls = list(map(int, input().split()))
	even = list(filter(lambda x: x % 2 == 0, balls))
	odd = list(filter(lambda x: x % 2 != 0, balls))
	if len(even) == 4 or (len(even) == 3 and len(odd) == 1):
		print('Yes')
	elif balls[0] > 0 and balls[1] > 0 and (balls[2] > 0):
		if len(odd) == 4 or (len(odd) == 3 and len(even) == 1):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


T = int(input())
for _ in range(0, T):
	(r, g, b, w) = map(int, input().split())
	R = r & 1
	G = g & 1
	B = b & 1
	W = w & 1
	if W == 1:
		if R + G + B == 0:
			print('Yes')
		elif R + G + B == 1:
			print('No')
		elif R + G + B == 2:
			if r > 0 and g > 0 and (b > 0):
				print('Yes')
			else:
				print('No')
		elif R + G + B == 3:
			if r > 0 and g > 0 and (b > 0):
				print('Yes')
			else:
				print('No')
	elif R + G + B == 0:
		print('Yes')
	elif R + G + B == 1:
		print('Yes')
	elif R + G + B == 2:
		print('No')
	elif R + G + B == 3:
		if r > 0 and g > 0 and (b > 0):
			print('Yes')
		else:
			print('No')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
from math import gcd
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	(r, g, b, w) = Ri()
	t = min(r, g, b)

	def check(lis):
		cnt = 0
		for i in lis:
			if i > 0 and i % 2 == 1:
				cnt += 1
		return cnt <= 1
	if check([r, g, b, w]):
		Yes()
	elif r > 0 and g > 0 and (b > 0) and check([r - 1, g - 1, b - 1, w + 1]):
		Yes()
	else:
		No()


t = int(input())
for k in range(t):
	(r, g, b, w) = [int(i) for i in input().split()]
	oe = [r % 2, g % 2, b % 2, w % 2]
	if oe.count(1) < 2:
		print('Yes')
	elif oe.count(1) == 2:
		print('No')
	elif r > 0 and g > 0 and (b > 0):
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(r, g, b, w) = map(int, input().split())
	a = []
	a.append(r % 2)
	a.append(g % 2)
	a.append(b % 2)
	a.append(w % 2)
	e = a.count(1)
	if e == 0 or e == 1 or e == 4:
		print('Yes')
	elif e == 3 and r * g * b != 0:
		print('Yes')
	else:
		print('No')
	t -= 1


for _ in range(int(input())):
	array = [int(x) for x in input().split()]
	(even, odd) = (0, 0)
	for i in array:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even >= 3:
		print('Yes')
	elif array[0] > 0 and array[1] > 0 and (array[2] > 0) and (odd >= 3):
		print('Yes')
	else:
		print('No')


t = int(input())
res = ['No' for i in range(t)]
for i in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		res[i] = 'Yes'
	elif r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 1
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			res[i] = 'Yes'
for i in range(t):
	print(res[i])


t = int(input())
for x in range(t):
	(r, g, b, w) = map(int, input().split())
	t = [r % 2, g % 2, b % 2, w % 2].count(1)
	if t == 0 or t == 1:
		print('Yes')
	elif (t == 3 or t == 4) and min(r, g, b) >= 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	n = r + g + b + w
	p = r % 2 + g % 2 + b % 2 + w % 2
	if n % 2 == 0 and p == 0:
		print('Yes')
		continue
	elif n % 2 == 1 and p == 1:
		print('Yes')
		continue
	if r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		p = r % 2 + g % 2 + b % 2 + w % 2
		if n % 2 == 0 and p == 0:
			print('Yes')
			continue
		elif n % 2 == 1 and p == 1:
			print('Yes')
			continue
	print('No')


t = int(input())
while t:
	t -= 1
	odd = 0
	(r, g, b, w) = map(int, input().split())
	if r % 2 != 0:
		odd += 1
	if g % 2 != 0:
		odd += 1
	if b % 2 != 0:
		odd += 1
	if w % 2 != 0:
		odd += 1
	if odd <= 1:
		print('Yes')
	elif odd == 2:
		print('No')
	elif odd == 3 or odd == 4:
		if r != 0 and g != 0 and (b != 0):
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	x = sum([i % 2 for i in [r, g, b, w]])
	if x == 0 or x == 1:
		print('Yes')
	else:
		x = sum([i % 2 for i in [r - 1, g - 1, b - 1, w + 3]])
		if (r > 0 and g > 0 and (b > 0)) and (x == 0 or x == 1):
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	s = r % 2 + g % 2 + b % 2 + w % 2
	print('No' if s == 2 or (s > 2 and r * g * b == 0) else 'Yes')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	o = 0
	for i in [r, g, b, w]:
		if i % 2:
			o += 1
	if o <= 1:
		print('Yes')
	else:
		x = min(r, g, b)
		if x > 0:
			w += 3
			r -= 1
			g -= 1
			b -= 1
			x -= 1
			o = 0
			for i in [r, g, b, w]:
				if i % 2:
					o += 1
			if o <= 1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


def call(r, g, b, w):
	if (r + g + b + w) % 2 == 0:
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
			return True
		else:
			return False
	else:
		x = []
		x.append(r % 2)
		x.append(g % 2)
		x.append(b % 2)
		x.append(w % 2)
		if sum(x) == 1:
			return True
		else:
			return False
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if call(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0):
		r1 = r - 1
		g1 = g - 1
		b1 = b - 1
		w1 = w + 3
		if call(r1, g1, b1, w1):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import math
import sys
input = sys.stdin.readline

def main():
	for _ in range(int(input())):
		(r, g, b, w) = [int(j) for j in input().split()]
		dic = dict()
		for i in range(5):
			dic[i] = 1
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			print('Yes')
		else:
			for i in range(5):
				dic[i] = 1
			if r == 0 or b == 0 or g == 0:
				print('No')
			else:
				temp = min(r, g, b)
				if temp % 2 == 1:
					pass
				else:
					temp = temp - 1
				r -= temp
				g -= temp
				b -= temp
				w += 3 * temp
				for i in range(5):
					dic[i] = 1
				if r % 2 + g % 2 + b % 2 + w % 2 > 1:
					print('No')
				else:
					print('Yes')
main()


for t in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	even = (r % 2 == 0) + (g % 2 == 0) + (b % 2 == 0) + (w % 2 == 0)
	if even >= 3 or even == 0:
		print('Yes')
	elif even == 1 and r * g * b > 0:
		print('Yes')
	else:
		print('No')


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(a, b, c, d):
	console('----- solving ------')
	console(a, b, c, d)
	console(a % 2 == 1, b % 2 == 1, c % 2 == 1, d % 2 == 1)
	console(a % 2 == 1 + b % 2 == 1 + c % 2 == 1 + d % 2 == 1)
	if (a % 2 == 1) + (b % 2 == 1) + (c % 2 == 1) + (d % 2 == 1) <= 1:
		console('default')
		return 'Yes'
	maxx = min(a, b, c)
	for val in range(20):
		if val <= maxx:
			if ((a - val) % 2 == 1) + ((b - val) % 2 == 1) + ((c - val) % 2 == 1) + ((d + 3 * val) % 2 == 1) <= 1:
				console('val', val)
				return 'Yes'
	return 'No'

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	(a, b, c, d) = list(map(int, input().split()))
	res = solve(a, b, c, d)
	print(res)


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	c = 0
	if r % 2 != 0:
		c += 1
	if g % 2 != 0:
		c += 1
	if b % 2 != 0:
		c += 1
	if w % 2 != 0:
		c += 1
	if c <= 1:
		print('YES')
	elif r >= 1 and g >= 1 and (b >= 1) and (c >= 3):
		print('YES')
	else:
		print('NO')


from sys import stdin
from math import ceil
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(r, g, b, w) = [int(x) for x in inp().split()]
	flag = False
	odd = 0
	even = 0
	for i in (r, g, b, w):
		if i % 2:
			odd += 1
		else:
			even += 1
	if odd == 3 and even == 1 and (min(r, g, b) > 0):
		print('Yes')
	elif odd == 1 and even == 3:
		print('Yes')
	elif even == 4 or odd == 4:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r + g + b + w <= 1:
		print('YES')
	else:
		p = True
		a = r % 2 + g % 2 + b % 2 + w % 2
		if a <= 1:
			print('YES')
		elif a == 3 or a == 4:
			if r and g and b:
				print('YES')
			else:
				print('NO')
		else:
			s = min(r, g, b)
			a = (r - s) % 2 + (g - s) % 2 + (b - s) % 2 + (w % 2 ^ s % 2)
			if a <= 1:
				print('YES')
			else:
				print('NO')


t = int(input())
while t > 0:
	t -= 1
	(r, g, y, b) = map(int, input().split())
	e = o = 0
	if r % 2 == 0:
		e += 1
	else:
		o += 1
	if g % 2 == 0:
		e += 1
	else:
		o += 1
	if y % 2 == 0:
		e += 1
	else:
		o += 1
	if e == 3 or o == 3 or (r > 0 and y > 0 and (g > 0) and (e == 1) and (o == 2) and (b % 2 == 1)) or (e == 2 and o == 1 and (b % 2 == 0)):
		print('Yes')
	else:
		print('No')


t = int(input())
for ii in range(t):
	(r, g, b, w) = map(int, input().split())
	if w % 2 == 0:
		cnt = r % 2 + g % 2 + b % 2
		if cnt < 2:
			print('YES')
		elif cnt == 3 and min(r, b, g) > 0:
			print('YES')
		else:
			print('NO')
	else:
		cnt = r % 2 + g % 2 + b % 2
		if cnt == 0:
			print('YES')
		elif min(r, g, b) > 0:
			r -= 1
			b -= 1
			g -= 1
			cnt = r % 2 + g % 2 + b % 2
			if cnt < 2:
				print('YES')
			elif cnt == 3 and min(r, b, g) > 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	(even, odd) = (0, 0)
	for num in l:
		if num != 0:
			if num % 2 == 0:
				even += 1
			else:
				odd += 1
	if l[-1] == 0:
		print('NO' if odd == 2 else 'YES')
	elif l.count(0) == 0:
		print('NO' if even == odd else 'YES')
	elif l.count(0) == 1:
		print('NO' if odd >= 2 else 'YES')
	elif l.count(0) == 2:
		print('NO' if odd == 2 else 'YES')
	else:
		print('YES')


def findParity(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		return 1
	return 0

def solve():
	if findParity(r, g, b, w):
		return 'Yes'
	if r and g and b:
		if findParity(r - 1, g - 1, b - 1, w + 3):
			return 'Yes'
	return 'No'
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	print(solve())


def possible(t: list):
	n = len(t)
	even = 0
	for e in t:
		if e % 2 == 0:
			even += 1
	return even == n or even == n - 1
T = int(input())
for i in range(T):
	rgbw = list(map(int, input().split()))
	if possible(rgbw):
		print('Yes')
		continue
	rgb_min = min(rgbw[:3])
	pos = False
	for _ in range(min(2, rgb_min)):
		rgbw[0] -= 1
		rgbw[1] -= 1
		rgbw[2] -= 1
		rgbw[3] += 3
		if possible(rgbw):
			pos = True
			break
	if pos:
		print('Yes')
	else:
		print('No')


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	(a, b, c, d) = li()
	flag = 0
	k = 3
	while a >= 0 and b >= 0 and (c >= 0) and (d >= 0) and (k >= 0):
		e = 0
		if a % 2 == 0:
			e += 1
		if b % 2 == 0:
			e += 1
		if c % 2 == 0:
			e += 1
		if d % 2 == 0:
			e += 1
		if e == 4 or e == 3:
			flag = 1
			break
		a -= 1
		b -= 1
		c -= 1
		d += 3
		k -= 1
	if flag:
		print('Yes')
	else:
		print('No')
for _ in range(I()):
	solve()


from sys import stdin, stdout

def input():
	return stdin.readline()

def prin(x):
	return stdout.write(str(x) + '\n')
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if (r + g + b + w) % 2 == 0:
		if r == 0 or g == 0 or b == 0:
			if g % 2 == 0 and b % 2 == 0 and (w % 2 == 0):
				print('Yes')
			else:
				print('No')
		elif w % 2 == 0:
			if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
				print('Yes')
			else:
				print('No')
		elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0):
			print('Yes')
		else:
			print('No')
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
		if w % 2 != 0:
			print('Yes')
		else:
			print('No')
	elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0):
		print('Yes')
	elif r % 2 != 0 and g % 2 == 0 and (b % 2 == 0) or (r % 2 == 0 and g % 2 != 0 and (b % 2 == 0)) or (r % 2 == 0 and g % 2 == 0 and (b % 2 != 0)):
		if w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif r % 2 == 0 and g % 2 != 0 and (b % 2 != 0) or (r % 2 != 0 and g % 2 == 0 and (b % 2 != 0)) or (r % 2 != 0 and g % 2 != 0 and (b % 2 == 0)):
		if w % 2 != 0 and (r != 0 and g != 0 and (b != 0)):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	odd = 0
	if r % 2 == 1:
		odd += 1
	if g % 2 == 1:
		odd += 1
	if b % 2 == 1:
		odd += 1
	if w % 2 == 1:
		odd += 1
	if odd == 1 or odd == 0:
		print('YES')
	elif odd == 2:
		print('NO')
	elif odd == 3 and min(r, g, b) >= 1:
		print('YES')
	elif odd == 4 and min(r, g, b) >= 1:
		print('YES')
	else:
		print('NO')


from collections import Counter
t = int(input())
for i in range(t):
	ba = list(map(int, input().split()))
	m = min(ba[:3])
	o = []
	for i in range(3):
		ba[i] = ba[i] - m
		o.append(ba[i] % 2)
	o.append((ba[3] + 3 * m) % 2)
	if o.count(1) <= 1:
		print('Yes')
	elif o.count(1) == 3 and m > 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for test in range(t):
	arr = [int(x) for x in input().split()]
	even = 0
	odd = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	mini = min(arr[:3])
	if odd == 0 or odd == 1:
		print('Yes')
	elif mini == 0:
		print('No')
	else:
		arr[0] -= 1
		arr[1] -= 1
		arr[2] -= 1
		arr[3] += 3
		odd = 0
		even = 0
		for i in arr:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd == 0 or odd == 1:
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	temp = 0
	temp = r % 2 + g % 2 + b % 2 + w % 2
	if temp == 0:
		print('Yes')
	elif temp == 1:
		print('Yes')
	elif temp == 2:
		print('No')
	elif temp == 3:
		if r * g * b == 0:
			print('No')
		else:
			print('Yes')
	elif temp == 4:
		if r * g * b == 0:
			print('No')
		else:
			print('Yes')


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().split())
inl = lambda : list(map(int, input().split()))
ans = []
t = ini()
for _ in range(t):
	a = inl()
	even = 0
	for i in a:
		if i % 2 == 0:
			even += 1
	if even in [0, 3, 4]:
		ans.append('Yes')
	elif a[0] > 0 and a[1] > 0 and (a[2] > 0) and (even == 1):
		ans.append('Yes')
	else:
		ans.append('No')
print('\n'.join(map(str, ans)))


for test in range(int(input())):
	a = list(map(int, input().split()))
	a = [a[-1]] + a[:-1]
	cnt = 0
	check = True
	for i in range(4):
		if a[i] % 2 == 1:
			cnt += 1
		if i >= 1 and a[i] == 0:
			check = False
	a[1] -= 1
	a[2] -= 1
	a[3] -= 1
	a[0] += 3
	if cnt <= 1:
		print('Yes')
	elif check:
		cnt = 0
		for i in range(4):
			if a[i] % 2 == 1:
				cnt += 1
		if cnt <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	colors = list(map(int, input().split()))
	even = []
	for i in range(4):
		if colors[i] % 2 == 0:
			even.append(i)
	if len(even) >= 3:
		print('Yes')
	elif len(even) == 0:
		if min(colors[:3]) > 0:
			print('Yes')
		else:
			print('No')
	elif len(even) == 1:
		if min(colors[:3]) > 0:
			print('Yes')
		else:
			print('No')
	elif len(even) == 2:
		print('No')


n = int(input())
while n:
	a = [int(x) for x in input().split()]
	mul = a[0] * a[1] * a[2]
	c_even = [0, 0]
	for x in a:
		if x % 2 == 0:
			c_even[0] += 1
		if mul == 0:
			continue
		elif (x - 1) % 2 == 0:
			c_even[1] += 1
	if c_even[0] >= 3 or c_even[1] >= 3:
		print('Yes')
	else:
		print('No')
	n -= 1


import sys
import math
import heapq
import collections
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

def print(*argv):
	fast_writer(' '.join((str(i) for i in argv)))
	fast_writer('\n')

def printspace(*argv):
	fast_writer(' '.join((str(i) for i in argv)))
	fast_writer(' ')

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	(r, g, b, w) = inputnums()
	odd = (r % 2 == 1) + (g % 2 == 1) + (b % 2 == 1) + (w % 2 == 1)
	even = (r % 2 == 0) + (g % 2 == 0) + (b % 2 == 0) + (w % 2 == 0)
	if odd == even:
		print('No')
	elif odd == 3 and (r == 0 or g == 0 or b == 0):
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	while l[0] >= 0 and l[1] >= 0 and (l[2] >= 0):
		ce = 0
		for i in l:
			if i % 2 == 0:
				ce = ce + 1
		if ce >= 3:
			print('YES')
			break
		if ce == 2:
			print('NO')
			break
		l = [l[0] - 1, l[1] - 1, l[2] - 1, l[3] + 3]
	if ce < 3 and ce != 2:
		print('NO')


import math
for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	arr = [a % 2, b % 2, c % 2, d % 2]
	if sum(arr) == 0 or sum(arr) == 1:
		print('Yes')
	elif sum(arr) == 3 and d % 2 == 0 or sum(arr) == 4:
		print('Yes')
	elif sum(arr) == 3 and d % 2 == 1:
		if a % 2 == 0 and a > 0 or (b % 2 == 0 and b > 0) or (c % 2 == 0 and c > 0):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from sys import stdin, stdout
from collections import Counter
from itertools import permutations
import bisect
import math
I = lambda : map(int, stdin.readline().split())
I1 = lambda : stdin.readline()
for _ in range(int(I1())):
	l = list(I())
	(o, e, n0) = (0, 0, 0)
	for i in range(4):
		if l[i] % 2 == 0:
			e += 1
		else:
			o += 1
		if l[i] == 0:
			n0 += 1
	if e == 4 or (e == 3 and o == 1) or o == 4:
		print('Yes')
	elif n0 == 1 and l[3] != 0 or n0 > 1:
		print('No')
	elif l[3] % 2 != 0 and o == 3:
		print('Yes')
	elif l[3] % 2 != 0 and o == 2:
		print('No')
	elif l[3] % 2 == 0 and o == 2:
		print('No')
	elif l[3] % 2 == 0 and o == 1 or (l[3] % 2 == 0 and o == 3):
		print('Yes')


def oddNum(r, g, b, w):
	if r % 2 + b % 2 + g % 2 + w % 2 > 1:
		return False
	else:
		return True

def solve(t):
	arr = list(map(int, input().split()))
	(r, g, b, w) = (arr[0], arr[1], arr[2], arr[3])
	if oddNum(r, g, b, w):
		return 'Yes'
	elif r > 0 and g > 0 and (b > 0) and oddNum(r - 1, g - 1, b - 1, w + 1):
		return 'Yes'
	else:
		return 'No'
t = int(input())
while t:
	print(solve(t))
	t -= 1


n = int(input())
outputs = []
for i in range(0, n):
	balls = list(map(int, input().split()))
	pairs = len([1 for x in balls if x % 2 == 0])
	boboniu = all(balls[0:3])
	if pairs >= 3 or (pairs <= 1 and boboniu):
		outputs.append('YES')
	else:
		outputs.append('NO')
for output in outputs:
	print(output)


for _ in range(int(input())):
	c_list = [int(x) for x in input().split(' ')]
	(r, g, b, w) = (c_list[0] % 2, c_list[1] % 2, c_list[2] % 2, c_list[3] % 2)
	if r + g + b + w == 1 or r + g + b + w == 0:
		print('Yes')
	elif r + g + b + w == 3 and c_list[0] != 0 and (c_list[1] != 0) and (c_list[2] != 0):
		print('Yes')
	elif r + g + b + w == 4 and c_list[0] != 0 and (c_list[1] != 0) and (c_list[2] != 0):
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import bisect
import math
from collections import deque
mod = 10 ** 9 + 7

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def DFS(dictionary, vertex, visited):
	visited[vertex] = True
	stack = [vertex]
	print(vertex)
	while stack:
		a = stack.pop()
		for i in dictionary[a]:
			if not visited[i]:
				print(i)
				visited[i] = True
				stack.append(i)

def BFS(dictionary, vertex, visited):
	visited[vertex] = True
	q = deque()
	q.append(vertex)
	while q:
		a = q.popleft()
		for i in dictionary[a]:
			if not visited[i]:
				visited[i] = True
				q.append(i)
				print(i)

def soe(limit):
	l = [1] * (limit + 1)
	l[0] = 0
	l[1] = 0
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	l = li()
	c = 0
	for i in l:
		if i & 1:
			c += 1
	if c == 1 or c == 0:
		pr('Yes')
	else:
		d = 0
		for i in range(3):
			if l[i] > 0:
				l[i] -= 1
				d += 1
		if d < 3:
			pr('No')
		else:
			e = 0
			l[-1] = l[-1] + d
			for i in l:
				if i & 1:
					e += 1
			if e == 0 or e == 1:
				pr('Yes')
			else:
				pr('No')
for _ in range(inp()):
	solve()


t = int(input())
for _ in range(t):
	li = list(map(int, input().split()))
	c_odd = 0
	c_even = 0
	for i in range(4):
		if li[i] % 2 == 0:
			c_even += 1
		else:
			c_odd += 1
	if c_even >= 3:
		print('YES')
	elif min(li[0], li[1], li[2]) == 0:
		print('NO')
	else:
		c_even = 0
		c_odd = 0
		for i in range(3):
			if li[i] % 2 == 0:
				c_even += 1
			else:
				c_odd += 1
		t = c_odd
		c_odd = c_even
		c_even = t
		if li[-1] % 2 == 0:
			c_odd += 1
		else:
			c_even += 1
		if c_even >= 3:
			print('YES')
		else:
			print('NO')


t = int(input())

def ef(b):
	counter = 0
	for i in range(len(b)):
		if b[i] % 2 == 1:
			counter += 1
	return counter
for k in range(t):
	a = list(map(int, input().split()))
	flag = 0
	for i in range(3):
		if a[i] == 0:
			flag = 1
	count = ef(a)
	if count == 0:
		print('YES')
		continue
	if count == 1:
		print('YES')
		continue
	if count == 2:
		print('NO')
		continue
	if count == 3 and flag == 0:
		print('YES')
		continue
	if count == 3 and flag == 1:
		print('NO')
		continue
	if count == 4 and flag == 0:
		print('YES')
		continue
	if count == 4 and flag == 1:
		print('NO')
		continue


t = int(input())
for i in range(t):
	(r, b, g, w) = map(int, input().split())
	if r % 2 + b % 2 + g % 2 + w % 2 < 2:
		print('Yes')
	elif r % 2 + b % 2 + g % 2 + w % 2 > 2 and r > 0 and (b > 0) and (g > 0):
		print('Yes')
	else:
		print('No')


def check_even(r, g, b, w):
	Jem = 4
	if r % 2 != 0:
		Jem -= 1
	if g % 2 != 0:
		Jem -= 1
	if b % 2 != 0:
		Jem -= 1
	if w % 2 != 0:
		Jem -= 1
	return Jem

def to_white(r, g, b, w):
	if r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
	return (r, g, b, w)
T = int(input())
answers = list()
for i in range(T):
	(r, g, b, w) = map(int, input().split())
	jubut = check_even(r, g, b, w)
	if jubut > 2:
		answers.append('Yes')
	else:
		(r, g, b, w) = to_white(r, g, b, w)
		jubut = check_even(r, g, b, w)
		if jubut > 2:
			answers.append('Yes')
		else:
			answers.append('No')
for i in answers:
	print(i)


t = int(input())
for inh in range(0, t):
	(a, b, c, d) = map(int, input().split())
	i = 0
	if a % 2 == 0:
		i += 1
	if b % 2 == 0:
		i += 1
	if c % 2 == 0:
		i += 1
	if d % 2 == 0:
		i += 1
	if i == 3 or i == 4:
		print('Yes')
	else:
		if a > 0 and b > 0 and (c > 0):
			i = 4 - i
		if i == 3 or i == 4:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) or (r % 2 != 0 and g % 2 != 0 and (b % 2 != 0)):
		print('Yes')
	else:
		odds = 0
		for num in [r, g, b]:
			if num % 2 != 0:
				odds += 1
		if odds == 1 and w % 2 == 0 or (odds == 2 and 0 not in [r, b, g] and (w % 2 != 0)):
			print('Yes')
		else:
			print('No')


def solve(l):
	even = 0
	odd = 0
	for i in range(len(l)):
		if l[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == 4 or even == 3:
		ans = 'Yes'
	elif even == 2:
		ans = 'No'
	elif l[0] == 0 or l[1] == 0 or l[2] == 0:
		ans = 'No'
	else:
		ans = 'Yes'
	print(ans)
n = int(input())
for i in range(n):
	l = list(map(int, input().split()))
	solve(l)


def chck(r, g, b, w):
	count = 0
	for i in range(len(l)):
		if int(l[i]) % 2 == 0:
			count += 1
	if count == 4 or count == 3 or count == 0:
		return 'Yes'
	if count == 2:
		return 'No'
	if count == 1:
		if l[0] == '0' or l[1] == '0' or l[2] == '0':
			return 'No'
		else:
			return 'Yes'
n = int(input())
l = []
for i in range(n):
	x = input()
	l = x.split()
	y = chck(int(l[0]), int(l[1]), int(l[2]), int(l[3]))
	print(y)


for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	works = False
	if sum([i % 2 for i in [r, g, b, w]]) <= 1:
		works = True
	if min(r, g, b) > 0:
		r -= 1
		b -= 1
		g -= 1
		w += 1
		if sum([i % 2 for i in [r, g, b, w]]) <= 1:
			works = True
	if works:
		print('Yes')
	else:
		print('No')


TT = int(input())
while TT:
	LL = list(map(int, input().split()))
	(even, odd) = (0, 0)
	for i in LL:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == 4 or even == 3:
		print('Yes')
	elif even == 2:
		print('No')
	elif LL[0] == 0 or LL[1] == 0 or LL[2] == 0:
		print('No')
	else:
		print('Yes')
	TT -= 1


for _ in range(int(input())):
	arr = [int(x) for x in input().split()]
	odds = 0
	evens = 0
	for el in arr:
		if el % 2 == 0:
			evens += 1
		else:
			odds += 1
	if odds <= 1:
		print('Yes')
	elif arr[0] > 0 and arr[1] > 0 and (arr[2] > 0):
		arr[0] -= 1
		arr[1] -= 1
		arr[2] -= 1
		arr[3] += 3
		odds = 0
		evens = 0
		for el in arr:
			if el % 2 == 0:
				evens += 1
			else:
				odds += 1
		if odds <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for test in range(t):
	(r, b, g, w) = [int(x) for x in input().split()]
	if r == 0 and b == 0 and (g == 0) and (w == 0):
		print('Yes')
	else:
		m = min(r, b, g)
		p = w % 2
		count1 = 0
		count1 += r % 2
		count1 += b % 2
		count1 += g % 2
		count2 = 3 - count1
		p2 = 1 - p
		if m == 0:
			if count1 + p <= 1:
				print('Yes')
			else:
				print('No')
		elif count2 + p2 <= 1 or count1 + p <= 1:
			print('Yes')
		else:
			print('No')


import sys
T = int(input())
for _ in range(T):
	(a, b, c, d) = map(int, input().split())
	if d % 2 == 0:
		val = a % 2 + b % 2 + c % 2
		if val == 2:
			print('No')
		else:
			print('Yes')
	else:
		val = a % 2 + b % 2 + c % 2
		if val == 1 or (val == 2 and (a == 0 or b == 0 or c == 0)):
			print('No')
		else:
			print('Yes')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	count = 0
	for i in l:
		if i % 2 != 0:
			count += 1
	if count != 2:
		if count == 3:
			f = 0
			for i in l[:3]:
				if i == 0:
					f = 1
					break
			if f == 1:
				print('No')
			else:
				print('Yes')
		else:
			print('Yes')
	else:
		print('No')


from collections import *
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	cntO = 0
	cntE = 0
	if r % 2 == 0:
		cntE += 1
	else:
		cntO += 1
	if g % 2 == 0:
		cntE += 1
	else:
		cntO += 1
	if b % 2 == 0:
		cntE += 1
	else:
		cntO += 1
	if w % 2 == 0:
		if cntE == 3 or cntO == 1 or cntO == 3:
			print('Yes')
		elif cntO == 3 and r == g == b:
			print('Yes')
		else:
			print('No')
	elif cntE == 3:
		print('Yes')
	elif r and g and b and (cntO >= 2):
		print('Yes')
	else:
		print('No')


import sys, math, heapq, collections, itertools, bisect
sys.setrecursionlimit(101000)

def solve(r, g, b, w):
	odd = sum((x % 2 for x in (r, g, b, w)))
	if odd <= 1:
		return True
	if r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		odd = sum((x % 2 for x in (r, g, b, w)))
		if odd <= 1:
			return True
	return False
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	print('Yes' if solve(r, g, b, w) else 'No')


T = int(input())
for t in range(T):
	(r, g, b, w) = map(int, input().split(' '))
	sum = r % 2 + g % 2 + b % 2 + w % 2
	if sum < 2 or sum == 4 or (sum == 3 and r > 0 and (g > 0) and (b > 0)):
		print('Yes')
	else:
		print('No')


for _ in range(0, int(input())):
	flag = 0
	(a1, a2, a3, a4) = map(int, input().split())
	if a1 % 2 == 1 and a2 % 2 == 1 and (a3 % 2 == 1):
		flag = 1
	elif a1 % 2 == 0 and a2 % 2 == 0 and (a3 % 2 == 0):
		flag = 1
	elif (a1 + a2 + a3) % 2 == 1:
		if a4 % 2 == 0:
			flag = 1
		else:
			flag = 0
	elif a1 > 0 and a2 > 0 and (a3 > 0):
		if a4 % 2 == 1:
			flag = 1
		else:
			flag = 0
	else:
		flag = 0
	if flag:
		print('Yes')
	else:
		print('No')


n = int(input())
while n > 0:
	n -= 1
	a = list(map(int, input().split()))
	c1 = 0
	c2 = 0
	for i in a:
		if i % 2 != 0:
			c2 += 1
	if c2 <= 1:
		print('Yes')
	else:
		if a[0] > 0 and a[1] > 0 and (a[2] > 0):
			for i in range(3):
				a[i] -= 1
			a[3] += 1
		for i in a:
			if i % 2 != 0:
				c1 += 1
		if c1 <= 1:
			print('Yes')
		else:
			z = min(a[:3])
			for i in range(3):
				a[i] -= z
			c1 = 0
			if z % 2 != 0:
				a[3] += 1
			for i in a[:3]:
				if i % 2 != 0:
					c1 += 1
			if c1 == 2:
				print('No')
			elif c1 == 0:
				print('Yes')
			elif c1 == 1 and a[3] % 2 == 0:
				print('Yes')
			else:
				print('No')


from sys import stdin
from collections import defaultdict
input = stdin.readline
t = int(input())
for _ in range(t):
	(a, b, c, d) = list(map(int, input().rstrip().split(' ')))
	oddCount = 0
	if a % 2 == 1:
		oddCount += 1
	if b % 2 == 1:
		oddCount += 1
	if c % 2 == 1:
		oddCount += 1
	if d % 2 == 1:
		oddCount += 1
	if oddCount == 0 or oddCount == 1 or (oddCount == 3 and (a != 0 and b != 0 and (c != 0))) or (oddCount == 4):
		print('Yes')
	else:
		print('No')


t = int(input())
for o in range(0, t):
	arr = list(map(int, input().split(' ')))
	count = 0
	for i in range(0, 4):
		if arr[i] % 2 == 1:
			count += 1
	if count <= 1:
		print('Yes')
		continue
	val = min(arr[0:3])
	flag = 3
	while val > 0 and flag != 0:
		for i in range(0, 3):
			arr[i] -= 1
		arr[3] += 3
		count = 0
		for i in range(0, 4):
			if arr[i] % 2 == 1:
				count += 1
		if count <= 1:
			print('Yes')
			break
		val -= 1
		flag -= 1
	if count > 1:
		print('No')


def even_odd(l):
	(e, o) = (0, 0)
	for x in l:
		if x % 2 == 0:
			e += 1
		else:
			o += 1
	return (e, o)
t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	(e, o) = even_odd(l)
	if e >= 3 and o <= 1:
		print('YES')
	elif l[0] != 0 and l[1] != 0 and (l[2] != 0):
		l[0] -= 1
		l[1] -= 1
		l[2] -= 1
		l[3] += 3
		(e, o) = even_odd(l)
		if e >= 3 and o <= 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		print('Yes')
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 != 0):
		print('Yes')
	elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0) and (w % 2 == 0) and (r > 0) and (g > 0) and (b > 0):
		print('Yes')
	elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0) and (w % 2 != 0) and (r > 0) and (g > 0) and (b > 0):
		print('Yes')
	elif (r % 2 != 0 and g % 2 != 0 or (b % 2 != 0 and g % 2 != 0) or (r % 2 != 0 and b % 2 != 0)) and w % 2 != 0 and (r > 0) and (g > 0) and (b > 0):
		print('Yes')
	elif (r % 2 == 0 and g % 2 == 0 or (b % 2 == 0 and g % 2 == 0) or (r % 2 == 0 and b % 2 == 0)) and w % 2 == 0:
		print('Yes')
	else:
		print('No')


import sys

def main():
	input = sys.stdin.readline
	print = sys.stdout.write
	t = int(input())
	for i1 in [0] * t:
		nums = list(map(int, input().split()))
		r = nums[0]
		g = nums[1]
		b = nums[2]
		w = nums[3]
		parity = [0] * 4
		for i in range(len(nums)):
			if nums[i] % 2 == 1:
				parity[i] = 1
		magic_sum = sum(parity)
		if magic_sum == 0 or magic_sum == 4 or magic_sum == 1:
			print('YES')
			print('\n')
		elif magic_sum == 2:
			print('NO')
			print('\n')
		elif w % 2 == 0:
			print('YES')
			print('\n')
		elif r == 0 or g == 0 or b == 0:
			print('NO')
			print('\n')
		else:
			print('YES')
			print('\n')
main()


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	r = a % 2 + b % 2 + c % 2 + d % 2
	print(['NO', 'YES'][r < 2 or (a * b * c != 0 and r > 2)])


T = int(input())
ans = []
for j in range(T):
	a = [int(i) for i in input().split()]
	nech = 0
	if min(a[0:3]) != 0:
		for i in range(3):
			if a[i] % 2 == 1:
				nech += 1
		if nech % 3 == 0:
			ans.append('Yes')
		elif nech == 2 and a[3] % 2 == 1 or (nech == 1 and a[3] % 2 == 0):
			ans.append('Yes')
		else:
			ans.append('No')
	else:
		for i in range(3):
			if a[i] % 2 == 1:
				nech += 1
		if nech == 1 and a[3] % 2 == 0:
			ans.append('Yes')
		elif nech == 0:
			ans.append('Yes')
		else:
			ans.append('No')
	print(ans[j])


t = int(input())
count = int()
flag = bool(False)
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	while r >= 0 and g >= 0 and (b >= 0):
		count = 0
		if (r + 2) % 2 == 1:
			count += 1
		if (g + 2) % 2 == 1:
			count += 1
		if (b + 2) % 2 == 1:
			count += 1
		if (w + 2) % 2 == 1:
			count += 1
		if count <= 1:
			flag = True
			break
		elif count == 2:
			flag = False
			break
		else:
			flag = False
		r -= 1
		g -= 1
		b -= 1
		w += 3
	if flag == True:
		print('Yes')
	else:
		print('No')


for i1 in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	temp = min(r, g, b)
	l = [r, g, b]
	count = 0
	for i in l:
		if i % 2 == 0:
			count += 1
	if 0 in l:
		if w % 2 == 0:
			count += 1
		if count >= 3:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if w % 2 == 0:
		if count == 1:
			print('No')
			continue
		else:
			print('Yes')
			continue
	elif count == 2:
		print('No')
		continue
	else:
		print('Yes')
		continue


testcases = int(input())
for testcase in range(testcases):
	temparr = input()
	temparr = temparr.split()
	arr = []
	for i in temparr:
		arr.append(int(i))
	r = arr[0]
	g = arr[1]
	b = arr[2]
	w = arr[3]
	if r == g and g == b and (b == w):
		print('YES')
		continue
	countodd = 0
	countodd += w & 1
	countodd += r & 1
	countodd += g & 1
	countodd += b & 1
	if countodd <= 1:
		print('YES')
		continue
	nr = r
	ng = g
	nb = b
	nw = w
	mins = min(r, g, b)
	nw += mins
	nr -= mins
	ng -= mins
	nb -= mins
	countodd = 0
	countodd += nw & 1
	countodd += nr & 1
	countodd += ng & 1
	countodd += nb & 1
	if countodd <= 1:
		print('YES')
		continue
	flag = 0
	counting = 0
	while r and g and b:
		countodd = 0
		r -= 1
		g -= 1
		b -= 1
		w += 1
		countodd += w & 1
		countodd += r & 1
		countodd += g & 1
		countodd += b & 1
		if countodd <= 1:
			flag = 1
			break
		counting += 1
		if counting > 10000:
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


import sys
INP = lambda : sys.stdin.readline().strip()
INT = lambda : int(INP())
MAP = lambda : map(int, INP().split())
ARR = lambda : [int(i) for i in INP().split()]

def JOIN(arr, x=' '):
	return x.join([str(i) for i in arr])

def EXIT(x='NO'):
	print(x)
	exit()

def solve():
	arr = ARR()
	odd = sum([1 for x in arr if x % 2])
	if odd == 2:
		return 'No'
	elif odd == 3 and arr[-1] % 2 and (0 in arr[:3]):
		return 'No'
	return 'Yes'
for _ in range(INT()):
	print(solve())


for _ in range(int(input())):
	rgbw = [int(i) for i in input().split()]
	units = [i % 2 for i in rgbw]
	if sum(units) == 1 or sum(units) == 4:
		print('Yes')
	elif sum(units) == 2:
		print('No')
	elif rgbw[3] % 2 == 0:
		print('Yes')
	elif min(rgbw[:3]) != 0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split(' '))
	arr = [r, g, b, w]
	(odd, even) = (0, 0)
	for item in arr:
		if item % 2 == 0:
			even = even + 1
		else:
			odd = odd + 1
	if odd == 2 and even == 2:
		print('No')
	elif odd == 4 or even == 4:
		print('Yes')
	elif odd == 1 and even == 3:
		print('Yes')
	elif r == 0 or b == 0 or g == 0:
		print('No')
	else:
		print('Yes')


def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = len(li) - 1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def mex(li):
	check = [0] * 1001
	for i in li:
		check[i] += 1
	for i in range(len(check)):
		if check[i] == 0:
			return i

def sumdigits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n //= 10
	return ans

def product(li):
	ans = 1
	for i in li:
		ans *= i
	return ans

def maxpower(n, k):
	cnt = 0
	while n > 1:
		cnt += 1
		n //= k
	return cnt

def knapsack(li, sumi, s, n, dp):
	if s == sumi // 2:
		return 1
	elif n == 0:
		return 0
	elif dp[n][s] != -1:
		return dp[n][s]
	else:
		if li[n - 1] <= s:
			dp[n][s] = knapsack(li, sumi, s - li[n - 1], n - 1, dp) or knapsack(li, sumi, s, n - 1, dp)
		else:
			dp[n][s] = knapsack(li, sumi, s, n - 1, dp)
		return dp[n][s]

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum
from math import *
for _ in range(int(input())):
	a = list(map(int, input().split()))
	f = 0
	upto = min(a[0], a[1], a[2])
	i = 1
	(cntod1, cntod2) = (0, 0)
	for i in a[:3]:
		if i & 1:
			cntod1 += 1
	if a[-1] & 1:
		cntod2 += 1
	if cntod1 + cntod2 <= 1:
		print('Yes')
	elif upto == 0:
		print('No')
	else:
		cntod1 = 3 - cntod1
		cntod2 ^= 1
		if cntod2 + cntod1 <= 1:
			print('Yes')
		else:
			print('No')


even = []
odd = []
n = int(input())
for i in range(n):
	(r, g, b, w) = map(int, input().split())
	if r % 2 == 0:
		even.append(r)
	else:
		odd.append(r)
	if g % 2 == 0:
		even.append(g)
	else:
		odd.append(g)
	if b % 2 == 0:
		even.append(b)
	else:
		odd.append(b)
	if w % 2 == 0:
		even.append(w)
	else:
		odd.append(w)
	if len(even) == 4 or len(odd) == 4:
		print('Yes')
	elif len(odd) == 1:
		print('Yes')
	elif len(even) == 1 and even[0] == w:
		print('Yes')
	elif len(even) == 1 and even[0] != 0:
		print('Yes')
	else:
		print('No')
	even = []
	odd = []


N = int(input())
i = 0
while i < N:
	(r, g, b, w) = list(map(int, input().split()))
	flag = False
	loop = 0
	while min(r, g, b) >= 0:
		if sum([r % 2, g % 2, b % 2, w % 2]) <= 1:
			flag = True
			break
		if loop > 0:
			break
		r -= 1
		g -= 1
		b -= 1
		w += 3
		loop += 1
	print('Yes' if flag else 'No')
	i += 1


import os
import sys
from collections import Counter
from io import BytesIO, IOBase

def main():
	for t in range(int(input())):
		(r, g, b, w) = map(int, input().split())
		a = [r, g, b]
		c = 0
		for i in range(3):
			if a[i] % 2 == 0:
				c += 1
		if c == 3 or (c == 2 and w % 2 == 0) or c == 0:
			print('YES')
		elif c == 2 and w % 2 == 1:
			print('NO')
		else:
			mi = min(a)
			if mi == 0:
				print('NO')
			elif c == 1 and w % 2 == 1:
				print('YES')
			else:
				print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import os
import sys
from io import BytesIO, IOBase
import threading
from collections import defaultdict
import heapq
from math import ceil, floor

def main():
	(r, g, b, w) = map(int, input().split())
	m = min(r, g, b)
	bol = True
	for k in range(min(2, m + 1)):
		if (r - k) % 2 + (g - k) % 2 + (b - k) % 2 + (w + k) % 2 <= 1:
			print('Yes')
			bol = False
			break
	if bol:
		print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(int(input())):
	main()


t = int(input())
for k in range(t):
	arr = input()
	lst = arr.split()
	cnt = 0
	r = int(lst[0])
	g = int(lst[1])
	b = int(lst[2])
	w = int(lst[3])
	if r % 2:
		cnt += 1
	if g % 2:
		cnt += 1
	if b % 2:
		cnt += 1
	if w % 2:
		cnt += 1
	if cnt <= 1:
		print('Yes')
		continue
	if r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
	cnt = 0
	if r % 2:
		cnt += 1
	if g % 2:
		cnt += 1
	if b % 2:
		cnt += 1
	if w % 2:
		cnt += 1
	if cnt <= 1:
		print('Yes')
		continue
	else:
		print('No')


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	odds = sum((x % 2 for x in l))
	if odds <= 1:
		print('Yes')
		continue
	if 0 in l[:-1]:
		print('No')
		continue
	l = [x - 1 for x in l[:-1]] + [l[-1] + 3]
	odds = sum((x % 2 for x in l))
	if odds <= 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for z in range(t):
	(r, g, b, w) = map(int, input().split())
	c = 0
	if r % 2 == 1:
		c += 1
	if g % 2 == 1:
		c += 1
	if b % 2 == 1:
		c += 1
	if w % 2 == 1:
		c += 1
	if c == 0 or c == 1:
		print('Yes')
		continue
	if r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 1
	c = 0
	if r % 2 == 1:
		c += 1
	if g % 2 == 1:
		c += 1
	if b % 2 == 1:
		c += 1
	if w % 2 == 1:
		c += 1
	if c == 0 or c == 1:
		print('Yes')
	else:
		print('No')


import random

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	c = 0
	if r % 2 == 1:
		c += 1
	if g % 2 == 1:
		c += 1
	if b % 2 == 1:
		c += 1
	if w % 2 == 1:
		c += 1
	if c == 1 or c == 0:
		print('Yes')
	elif min(r, b, g) == 0:
		print('No')
	else:
		r -= 1
		b -= 1
		g -= 1
		w += 3
		c = 0
		if r % 2 == 1:
			c += 1
		if g % 2 == 1:
			c += 1
		if b % 2 == 1:
			c += 1
		if w % 2 == 1:
			c += 1
		if c == 1 or c == 0:
			print('Yes')
		else:
			print('No')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	mx = min(r, g, b)
	w += mx * 3
	r -= mx
	g -= mx
	b -= mx
	arr = [r % 2, g % 2, b % 2, w % 2]
	inverse = [1] * 4
	if mx >= 1:
		inverse = [1 - i for i in arr]
	if arr.count(1) > 1 and inverse.count(1) > 1:
		print('No')
	else:
		print('Yes')


for i in range(0, int(input())):
	a = list(map(int, input().split()))
	c = 0
	for k in a:
		if k % 2 == 0:
			c += 1
	if c == 4 or c == 3 or c == 0:
		print('Yes')
	elif c == 2:
		print('No')
	elif c == 1:
		q = min(a[0], a[1], a[2])
		if q == 0:
			print('No')
		else:
			print('Yes')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	if r == g and g == b:
		print('YES')
		continue
	c = 0
	if r % 2 != 0:
		c += 1
	if g % 2 != 0:
		c += 1
	if b % 2 != 0:
		c += 1
	if w % 2 != 0:
		c += 1
	if c <= 1:
		print('YES')
	else:
		r -= 1
		g -= 1
		b -= 1
		w += 3
		c = 0
		flag = False
		if r < 0 or g < 0 or b < 0:
			flag = True
		if r % 2 != 0:
			c += 1
		if g % 2 != 0:
			c += 1
		if b % 2 != 0:
			c += 1
		if w % 2 != 0:
			c += 1
		if c <= 1 and (not flag):
			print('YES')
		else:
			print('NO')


n = int(input())
result = []
for i in range(n):
	l = list(map(int, input().split()))
	m = min(l[:-1])
	count = 0
	for i in range(len(l) - 1):
		if l[i] % 2 != 0:
			count += 1
	if count == 1:
		if l[-1] % 2 == 0:
			result.append('YES')
		else:
			result.append('NO')
	elif count == 2:
		if m > 0:
			if l[-1] % 2 != 0:
				result.append('YES')
			else:
				result.append('NO')
		else:
			result.append('NO')
	else:
		result.append('YES')
for i in result:
	print(i)


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve():
	(r, g, b, w) = get_tuple()
	mini = min(r, g, b)
	c = 0
	if r % 2 != 0:
		c += 1
	if g % 2 != 0:
		c += 1
	if b % 2 != 0:
		c += 1
	if w % 2 != 0:
		c += 1
	if c <= 1:
		print('Yes')
	elif c == 2:
		print('No')
	elif mini > 0:
		print('Yes')
	else:
		print('No')

def main():
	solve()
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	a = 0
	c = min(r, b, g)
	if r % 2 == 1:
		a += 1
	if g % 2 == 1:
		a += 1
	if b % 2 == 1:
		a += 1
	if w % 2 == 1:
		a += 1
	if a <= 1:
		print('Yes')
	elif c != 0:
		r -= 1
		g -= 1
		b -= 1
		w -= 1
		a = 0
		if r % 2 == 1:
			a += 1
		if g % 2 == 1:
			a += 1
		if b % 2 == 1:
			a += 1
		if w % 2 == 1:
			a += 1
		if a <= 1:
			print('Yes')
		else:
			print('NO')
	else:
		print('NO')


import sys
import math
from collections import Counter, defaultdict
input = sys.stdin.readline
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	(r, g, b, w) = MAP()
	if r == 0 or g == 0 or b == 0:
		if r % 2 + g % 2 + b % 2 + w % 2 < 2:
			print('Yes')
		else:
			print('No')
	else:
		if r % 2 + g % 2 + b % 2 + w % 2 < 2:
			print('Yes')
			return
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if r % 2 + g % 2 + b % 2 + w % 2 < 2:
			print('Yes')
		else:
			print('No')
for _ in range(IN()):
	case()


def solve(r, g, b, w):
	perform = False
	if r == 0 or g == 0 or b == 0:
		perform = True
	odd = 0
	even = 0
	if r % 2 == 0:
		even += 1
	else:
		odd += 1
	if g % 2 == 0:
		even += 1
	else:
		odd += 1
	if b % 2 == 0:
		even += 1
	else:
		odd += 1
	if perform:
		if even == 3:
			print('YES')
		elif odd == 1 and even == 2 and (w % 2 == 0):
			print('YES')
		else:
			print('NO')
	elif odd == 3:
		print('YES')
	elif odd == 2 and even == 1 and (w % 2 != 0):
		print('YES')
	elif odd == 1 and even == 2 and (w % 2 == 0):
		print('YES')
	elif even == 3:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	solve(r, g, b, w)


T = int(input())
for test in range(T):
	(r, g, b, w) = map(int, input().split())
	arr = [r % 2, g % 2, b % 2, w % 2]
	if arr.count(1) == 0 or arr.count(1) == 1 or arr.count(1) == 4:
		print('YES')
	elif arr.count(1) == 3 and all([r != 0, g != 0, b != 0]):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	cont = 0
	val = min(r, g, b)
	if r % 2 == 1:
		cont += 1
	if g % 2 == 1:
		cont += 1
	if b % 2 == 1:
		cont += 1
	if w % 2 == 1:
		cont += 1
	if cont <= 1:
		print('Yes')
		continue
	elif val != 0:
		w += 3
		r -= 1
		g -= 1
		b -= 1
		cont = 0
		if r % 2 == 1:
			cont += 1
		if g % 2 == 1:
			cont += 1
		if b % 2 == 1:
			cont += 1
		if w % 2 == 1:
			cont += 1
		if cont <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())

def check(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 > 1:
		return False
	else:
		return True
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	if check(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and check(r - 1, g - 1, b - 1, w + 1):
		print('Yes')
	else:
		print('No')


import math
import time
from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from queue import PriorityQueue
import sys
t = int(input())
for _ in range(t):
	a = list(map(int, stdin.readline().split()))
	c = 0
	for i in range(4):
		if a[i] & 1:
			c += 1
	if c < 2:
		print('Yes')
	else:
		c = 0
		poss = True
		for i in range(3):
			if a[i] == 0:
				poss = False
				break
			if a[i] & 1 == 0:
				c += 1
		if a[3] & 1 == 0:
			c += 1
		if c < 2 and poss:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	a = min(r, g, b)
	if a > 0 and sum(map(lambda x: x % 2, [r - 1, g - 1, b - 1, w + 1])) <= 1 or sum(map(lambda x: x % 2, [r, g, b, w])) <= 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = [a[j] % 2 for j in range(len(a))]
	if b.count(0) == 4:
		print('Yes')
	elif b.count(0) == 3:
		print('Yes')
	elif min(a[:3]) >= 1:
		a[0] -= 1
		a[1] -= 1
		a[2] -= 1
		a[3] += 3
		c = [a[j] % 2 for j in range(4)]
		if c.count(0) == 4:
			print('Yes')
		elif c.count(0) == 3:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
T = ni()
for _ in range(T):
	(r, g, b, w) = nm()
	m = min(r, g, b)
	j = r % 2 + g % 2 + b % 2 + w % 2
	if m == 0 and j == 3 or j == 2:
		print('No')
	else:
		print('Yes')


test = int(input())
for _ in range(test):
	(r, g, b, w) = map(int, input().split())
	min_ = min(r, g, b)
	max_ = max(r, g, b)
	flag = 0
	if min_ > 0:
		(r, g, b) = (r - min_, g - min_, b - min_)
		w += min_ * 3
		odd = 0
		if r % 2 != 0:
			odd += 1
		if g % 2 != 0:
			odd += 1
		if b % 2 != 0:
			odd += 1
		if w % 2 != 0:
			odd += 1
		if odd > 1 and odd % 2 == 0:
			flag = 1
	elif max_ > 0:
		odd = 0
		if r % 2 != 0:
			odd += 1
		if g % 2 != 0:
			odd += 1
		if b % 2 != 0:
			odd += 1
		if w % 2 != 0:
			odd += 1
		if odd > 1:
			flag = 1
	if flag == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	(r, g, b, w) = map(int, input().split())
	l = []
	l.append(r)
	l.append(g)
	l.append(b)
	l.append(w)
	if r == 0 or g == 0 or b == 0:
		count = 0
		for i in range(4):
			if l[i] % 2 != 0:
				count += 1
		if count > 1:
			print('No')
		else:
			print('Yes')
	else:
		count = 0
		for i in range(4):
			if l[i] % 2 != 0:
				count += 1
		if count == 1 or count == 0 or count == 3 or (count == 4):
			print('Yes')
		else:
			print('No')
	t -= 1


def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
for _ in range(ii()):
	(r, g, b, w) = mi()
	s = r + g + b + w
	c = 0
	f = 0
	if r == 0 or g == 0 or b == 0:
		if r & 1:
			c += 1
		if g & 1:
			c += 1
		if b & 1:
			c += 1
		if w & 1:
			c += 1
		if c == 0:
			f = 1
		elif c == 1 and s & 1:
			f = 1
		if f:
			print('Yes')
		else:
			print('No')
		continue
	if r & 1:
		c += 1
	if b & 1:
		c += 1
	if g & 1:
		c += 1
	if c == 0:
		if w % 2 == 0:
			f = 1
		elif s % 2:
			f = 1
	elif c == 1 and w % 2 == 0 and s % 2:
		f = 1
	else:
		c = 3 - c
		w += 3
		if w & 1:
			c += 1
		if c == 0:
			f = 1
		elif c == 1 and s & 1:
			f = 1
	if f:
		print('Yes')
	else:
		print('No')


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math
from collections import defaultdict
for _ in range(ri()):
	l = ria()
	cnt = x = 0
	for i in range(3):
		if l[i] % 2:
			cnt += 1
		if l[i] == 0:
			x += 1
	if cnt == 0:
		print('Yes')
	elif cnt == 1 and l[-1] % 2 == 0:
		print('Yes')
	elif cnt == 2 and x != 1 and l[-1] % 2:
		print('Yes')
	elif cnt == 3:
		print('Yes')
	else:
		print('No')


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	a = il()
	u = 0
	v = 0
	c = 0
	l = 0
	for i in range(0, 3):
		if a[i] % 2 == 0 and a[i] != 0:
			u = u + 1
		elif a[i] != 0:
			v = v + 1
		elif a[i] == 0:
			c = c + 1
		if a[i] == 1:
			l = l + 1
	if len(set(a)) == 1:
		print('Yes')
	elif c == 1 and u >= 1 and (a[3] % 2 == 0):
		print('Yes')
	elif c == 1 and u == 2 and (a[3] % 2 != 0):
		print('Yes')
	elif c == 2 and v == 1 and (a[3] % 2 == 0):
		print('Yes')
	elif c == 2 and u == 1:
		print('Yes')
	elif c == 3:
		print('Yes')
	elif u == 2 and v == 1 and (a[3] % 2 == 0):
		print('Yes')
	elif u == 1 and v == 2 and (a[3] % 2 != 0):
		print('Yes')
	elif v == 3 or u == 3:
		print('Yes')
	else:
		print('No')


def func(r, g, b, w):
	return r % 2 + g % 2 + b % 2 + w % 2
for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	l = [r, g, b]
	minim = min(l)
	if minim == 0 and func(r, g, b, w) <= 1:
		print('Yes')
	elif minim == 0 and func(r, g, b, w) > 1:
		print('No')
	elif minim > 0 and func(r, g, b, w) != 2:
		print('Yes')
	else:
		print('No')


def count_one_odd(a):
	co = [_ for _ in a if _ % 2 == 1]
	if len(co) in [1]:
		return True
	return False

def can_create_palindrome(r1, g1, b1, w1):
	if r1 % 2 == g1 % 2 == b1 % 2 == w1 % 2 == 0 or count_one_odd([r1, g1, b1, w1]):
		return 'Yes'
	if r1 > 0 and b1 > 0 and (g1 > 0):
		r1 -= 1
		b1 -= 1
		g1 -= 1
		w1 += 3
		if r1 % 2 == g1 % 2 == b1 % 2 == w1 % 2 == 0 or count_one_odd([r1, g1, b1, w1]):
			return 'Yes'
	return 'No'
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	print(can_create_palindrome(r, g, b, w))


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	m = min(a, b, c)
	s = 0
	if a != 0 and a % 2 != 0:
		s += 1
	if b != 0 and b % 2 != 0:
		s += 1
	if c != 0 and c % 2 != 0:
		s += 1
	if d != 0 and d % 2 != 0:
		s += 1
	if m == 0 and s > 1:
		print('NO')
	elif m == 0 and s < 2:
		print('YES')
	elif m > 0 and (4 - s < 2 or s < 2):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	lst = list(map(lambda x: x % 2, a))
	if 1 not in lst:
		print('Yes')
	elif lst.count(1) == 1:
		print('Yes')
	elif lst.count(1) == 2:
		print('No')
	elif lst.count(1) == 4:
		print('Yes')
	elif lst[:3].count(1) == 3:
		print('Yes')
	else:
		p = lst.index(0)
		if a[p] > 0:
			print('Yes')
		else:
			print('No')


from collections import Counter
import string
import math
import sys

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
mod = 1000000007
for _ in range(vary(1)):
	(r, g, b, w) = vary(4)
	codd = 0
	if r % 2 != 0:
		codd += 1
	if g % 2 != 0:
		codd += 1
	if b % 2 != 0:
		codd += 1
	if r == 0 or b == 0 or g == 0:
		if w % 2 != 0:
			codd += 1
		if codd > 1:
			print('No')
		else:
			print('Yes')
		continue
	if codd == 3:
		print('Yes')
		continue
	if codd == 2:
		if w % 2 == 0:
			print('NO')
			continue
		if w % 2 != 0:
			print('Yes')
			continue
	if codd == 1:
		if w % 2 == 0:
			print('Yes')
		else:
			print('No')
		continue
	if codd == 0:
		print('Yes')


import math
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	if w % 2 + r % 2 + b % 2 + g % 2 == 1 or w % 2 + r % 2 + b % 2 + g % 2 == 0:
		print('Yes')
	else:
		o = min(r, g, b)
		if o == 0:
			print('No')
		else:
			w = w + 1
			r -= 1
			g -= 1
			b -= 1
			if w % 2 + r % 2 + b % 2 + g % 2 == 1 or w % 2 + r % 2 + b % 2 + g % 2 == 0:
				print('Yes')
			else:
				print('No')


def solve():
	T = int(input())
	ans = ['Yes'] * T
	for i in range(T):
		A = list(map(int, input().split()))
		B = sum(map(lambda x: x % 2, A))
		if B == 2 or (B == 3 and 0 in A[:3]):
			ans[i] = 'No'
	return ans
print(*solve(), sep='\n')


def check(r, g, b, w):
	c = 0
	arr = [r, g, b, w]
	for i in range(4):
		if arr[i] % 2 == 0:
			c += 1
	return c
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	x = check(r, g, b, w)
	if x == 2:
		print('No')
	elif x > 2:
		print('Yes')
	elif r * g * b > 0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	li = list(map(int, input().split()))
	odd = 0
	for i in li:
		if i % 2 != 0:
			odd += 1
	if odd <= 1:
		print('Yes')
	else:
		flag = True
		for i in range(3):
			if li[i] != 0:
				li[i] -= 1
			else:
				flag = False
				break
		if flag:
			li[-1] += 3
		odd = 0
		if flag:
			for i in li:
				if i % 2 != 0:
					odd += 1
			if odd <= 1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	(r, g, b, w) = map(int, stdin.readline().split())
	ha = int(r & 1) + int(g & 1) + int(b & 1)
	minn = min(r, min(g, b))
	if ha == 0 or ha == 3 or (ha == 1 and w & 1 ^ 1) or (ha == 2 and w & 1 and (minn != 0)):
		print('Yes')
		continue
	print('No')


ii = lambda : int(input())
il = lambda : list(map(int, input().split()))
for _ in range(ii()):
	a = il()
	vd = 0
	u = 0
	v = 0
	c = 0
	l = 0
	dld = 0
	for i in range(0, 3):
		if a[i] % 2 == 0 and a[i] != 0:
			u = u + 1
		elif a[i] != 0:
			v = v + 1
		elif a[i] == 0:
			c = c + 1
	if len(set(a)) == 1:
		print('Yes')
		pnd = 0
	elif c == 1 and u >= 1 and (a[3] % 2 == 0):
		print('Yes')
	elif c == 1 and u == 2 and (a[3] % 2 != 0):
		print('Yes')
		kld = 0
	elif c == 2 and v == 1 and (a[3] % 2 == 0):
		print('Yes')
		npd = 0
	elif c == 2 and u == 1:
		print('Yes')
		spd = 0
	elif c == 3:
		print('Yes')
	elif u == 2 and v == 1 and (a[3] % 2 == 0):
		print('Yes')
	elif u == 1 and v == 2 and (a[3] % 2 != 0):
		print('Yes')
	elif v == 3 or u == 3:
		print('Yes')
		pdl = 0
	else:
		print('No')
		ndl = 0


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	s = r + g + b + w
	e = r % 2 + g % 2 + b % 2 + w % 2
	if s % 2 == 0:
		if e in [0, 4]:
			print('Yes')
		else:
			print('No')
	elif e == 1:
		print('Yes')
	elif e == 3 and min(r, g, b) >= 1:
		print('Yes')
	else:
		print('No')


def solve():
	arr = [int(i) for i in input().split()]
	count = 0
	r = arr[0]
	g = arr[1]
	b = arr[2]
	w = arr[3]
	if r == 0 or g == 0 or b == 0:
		if r & 1:
			count += 1
		if g & 1:
			count += 1
		if b & 1:
			count += 1
		if w & 1:
			count += 1
		if count == 1 or count == 0:
			print('Yes')
		else:
			print('No')
	else:
		if r & 1:
			count += 1
		if g & 1:
			count += 1
		if b & 1:
			count += 1
		if w & 1:
			count += 1
		if count == 1 or count == 0:
			print('Yes')
			return
		r -= 1
		g -= 1
		b -= 1
		w += 3
		count = 0
		if r & 1:
			count += 1
		if g & 1:
			count += 1
		if b & 1:
			count += 1
		if w & 1:
			count += 1
		if count == 1 or count == 0:
			print('Yes')
		else:
			print('No')
test = int(input())
while test:
	solve()
	test -= 1


try:
	import math
	t = int(input())
	for i in range(0, t):
		r = list(map(int, input().split(' ')))
		e = 0
		o = 0
		for i in range(0, len(r)):
			if r[i] % 2 == 0:
				e += 1
			else:
				o += 1
		if e >= 3:
			print('Yes')
		else:
			for i in range(0, len(r) - 1):
				r[i] -= 1
			r[3] += 3
			a1 = 0
			a2 = 0
			vh = 0
			flag = 0
			for i in range(0, len(r)):
				if r[i] < 0:
					flag = 1
			gh = 0
			if flag == 1:
				print('No')
			else:
				for i in range(0, len(r)):
					if r[i] % 2 == 0:
						gh += 1
				if gh >= 3:
					print('Yes')
				else:
					print('No')
except:
	pass


t = int(input())
for h in range(t):
	lis = list(map(int, input().split()))
	r = lis[0]
	g = lis[1]
	b = lis[2]
	w = lis[3]
	a = 0
	j = 0
	for i in [r, g, b]:
		if i % 2 != 0:
			a += 10 ** j
			j += 1
	if a == 0 or a == 111:
		print('YES')
	elif 0 in [r, g, b]:
		if a == 1 or a == 10 or a == 100:
			if w % 2 == 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	elif a == 1 or a == 10 or a == 100:
		if w % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif w % 2 != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
for j in range(t):
	c = k = 0
	L = list(map(int, input().split()))
	for i in L:
		if i % 2 == 1:
			c = c + 1
	for i in L[:3]:
		if i == 0:
			k = k + 1
	if k > 0:
		if c > 1:
			print('No')
		else:
			print('Yes')
	elif c == 2:
		print('No')
	else:
		print('Yes')


import sys

def main():
	t = Iint()
	for _ in range(t):
		(r, g, b, w) = Imap()
		parity = [x % 2 for x in [r, g, b, w]]
		count_odd = sum(parity)
		if count_odd < 2 or count_odd == 4:
			print('Yes')
		elif count_odd == 2:
			print('No')
		elif count_odd == 3:
			if sum(parity[:3]) == 3:
				print('Yes')
			elif 0 in (r, g, b):
				print('No')
			else:
				print('Yes')
FIO = 10

def I():
	return input()

def Iint():
	return int(input())

def Ilist():
	return list(map(int, input().split()))

def Imap():
	return map(int, input().split())

def Plist(li, s=' '):
	print(s.join(map(str, li)))
en = enumerate

def answer_debug(*args):
	print('\x1b[31m', *args, '\x1b[0m', file=sys.stderr)

def debug(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
if not FIO:
	if __name__ == '__main__':
		main()
		exit()
else:
	from io import BytesIO, IOBase
	import os
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
for i in range(n):
	(r, g, b, w) = [int(_) for _ in input().split()]
	e = 0
	o = 0
	if r % 2 == 0:
		e += 1
	else:
		o += 1
	if g % 2 == 0:
		e += 1
	else:
		o += 1
	if b % 2 == 0:
		e += 1
	else:
		o += 1
	if w % 2 == 0:
		e += 1
	else:
		o += 1
	if r * g * b == 0:
		if e >= 3:
			print('Yes')
		else:
			print('No')
		continue
	if e == o:
		print('No')
	else:
		print('Yes')


t = int(input())
ans = []
for _ in range(t):
	[r, g, b, w] = list(map(int, input().split()))
	if r % 2 + g % 2 + b % 2 + w % 2 > 1:
		if min(r, g, b):
			r -= 1
			g -= 1
			b -= 1
			w += 3
			val = int(r % 2 + g % 2 + b % 2 + w % 2 > 1)
			ans.append(['Yes', 'No'][val])
		else:
			ans.append('No')
	else:
		ans.append('Yes')
for x in ans:
	print(x)


t = int(input())
while t:
	t -= 1
	arr = list(map(int, input().split()))
	odd = 0
	for i in range(4):
		if arr[i] % 2 == 1:
			odd += 1
	odd2 = 4
	if min(arr[0:3]) > 0:
		odd2 = 4 - odd
	if odd <= 1 or odd2 <= 1:
		print('Yes')
	else:
		print('No')


def halp(a):
	odd = 0
	flag = True
	for i in a:
		if i % 2 != 0:
			odd += 1
		if odd > 1:
			flag = False
			break
	if flag == True:
		return 'Yes'
	else:
		for i in range(3):
			a[i] -= 1
		a[3] += 3
		for i in a:
			if i < 0:
				return 'No'
		odd = 0
		flag = True
		for i in a:
			if i % 2 != 0:
				odd += 1
			if odd > 1:
				flag = False
				break
		if flag == True:
			return 'Yes'
		else:
			return 'No'
for _ in range(int(input())):
	a = list(map(int, input().split()))
	print(halp(a))


def yes_or_no(balls):
	even = balls[0] % 2 + balls[1] % 2 + balls[2] % 2 + balls[3] % 2
	if even <= 1:
		return 'Yes'
	elif even == 2:
		return 'No'
	elif balls[0] > 0 and balls[1] > 0 and (balls[2] > 0):
		return 'Yes'
	else:
		return 'No'
n = int(input())
cases = []
for i in range(n):
	cases.append([int(j) for j in input().split()])
for i in cases:
	print(yes_or_no(i))


import sys
input = sys.stdin.buffer.readline
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
inst = lambda : input().decode().rstrip('\n\r')
INF = float('inf')
_T_ = inin()
for _t_ in range(_T_):
	c = inar()
	odd = 0
	even = 0
	for i in c:
		if i % 2:
			odd += 1
		else:
			even += 1
	if odd <= 1:
		print('Yes')
	elif all(c[0:3]):
		for i in range(3):
			c[i] -= 1
		c[3] += 3
		odd = 0
		even = 0
		for i in c:
			if i % 2:
				odd += 1
			else:
				even += 1
		if odd <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
mo = 1000000007
t = inn()
while t:
	t -= 1
	(r, g, b, w) = value()
	r1 = r % 2
	r2 = g % 2
	r3 = b % 2
	r4 = w % 2
	if r1 + r2 + r3 + r4 == 0 or r1 + r2 + r3 + r4 == 1:
		print('Yes')
	elif r1 + r2 + r3 + r4 == 4:
		print('Yes')
	elif r1 + r2 + r3 + r4 == 2:
		print('No')
	elif r == 0 or g == 0 or b == 0:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	tmp = list(map(int, input().split()))
	num = [x for x in tmp if x % 2]
	if len(num) <= 1:
		print('Yes')
		continue
	if min(tmp[:3]) > 0:
		num = [x for x in tmp if x % 2 == 0]
		if len(num) <= 1:
			print('Yes')
			continue
	print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = [int(i) for i in input().strip().split()]
	v1 = r % 2
	v2 = g % 2
	v3 = b % 2
	v4 = w % 2
	if v1 == v2 and v2 == v3:
		print('Yes')
	elif r == 0 or g == 0 or b == 0:
		if v1 + v2 + v3 + v4 > 1:
			print('No')
		else:
			print('Yes')
	elif v1 ^ v2 ^ v3 ^ v4 == 1:
		print('Yes')
	else:
		print('No')


def sol():
	(r, g, b, w) = map(int, input().split())
	num_even = sum([r % 2 == 0, b % 2 == 0, g % 2 == 0, w % 2 == 0])
	if num_even >= 3:
		return 'Yes'
	elif min(r, g, b) == 0:
		return 'No'
	elif num_even <= 1:
		return 'Yes'
	else:
		return 'No'

def main():
	T = int(input())
	for t in range(T):
		res = sol()
		print(res)
main()


def find(a):
	count = 0
	for i in range(0, 4):
		if a[i] % 2 == 0:
			count += 1
	if count == 4 or count == 3:
		return 'Yes'
	if count == 1 and min(a[0:3]) > 0:
		return 'Yes'
	if count == 0:
		return 'Yes'
	return 'No'
T = int(input())
for _ in range(0, T):
	a = list(map(int, input().split()))
	k = find(a)
	print(k)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
inst = lambda : input().decode().rstrip('\n\r')
INF = float('inf')
_T_ = inin()
for _t_ in range(_T_):
	c = inar()
	odd = 0
	even = 0
	for i in c:
		if i % 2:
			odd += 1
		else:
			even += 1
	if odd <= 1:
		print('Yes')
	elif all(c[0:3]):
		for i in range(3):
			c[i] -= 1
		c[3] += 3
		odd = 0
		even = 0
		for i in c:
			if i % 2:
				odd += 1
			else:
				even += 1
		if odd <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def run():
	color = [int(i) for i in input().split()]
	ret = [1 for i in color if i & 1]
	if 0 in color[:3]:
		if sum(ret) <= 1:
			print('Yes')
		else:
			print('No')
		return
	if sum(ret) != 2:
		print('Yes')
		return
	else:
		print('No')
		return
n = int(input())
for i in range(n):
	run()


import sys
input = sys.stdin.readline

def is_ok(r, g, b, w):
	odd_cnt = 0
	if r % 2 == 1:
		odd_cnt += 1
	if g % 2 == 1:
		odd_cnt += 1
	if b % 2 == 1:
		odd_cnt += 1
	if w % 2 == 1:
		odd_cnt += 1
	if odd_cnt <= 1:
		return True
	else:
		return False
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if is_ok(r, g, b, w):
		print('Yes')
		continue
	ok = False
	for _ in range(4):
		if r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 1
			ok = is_ok(r, g, b, w)
		if ok:
			break
	if ok:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		(r, g, b, w) = map(int, input().split())
		alpha = r % 2 + g % 2 + b % 2 + w % 2
		if alpha <= 1:
			print('Yes')
		elif alpha >= 3 and r > 0 and (g > 0) and (b > 0):
			print('Yes')
		else:
			print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def pal(l):
	e = 0
	o = 0
	if l[0] % 2 == 0:
		e += 1
	else:
		o += 1
	if l[1] % 2 == 0:
		e += 1
	else:
		o += 1
	if l[2] % 2 == 0:
		e += 1
	else:
		o += 1
	if l[3] % 2 == 0:
		e += 1
	else:
		o += 1
	if e == 4:
		return 'Yes'
	elif e == 3:
		return 'Yes'
	elif e == 2:
		return 'No'
	elif e == 1:
		if l[0] % 2 == 1 and l[1] % 2 == 1 and (l[2] % 2 == 1):
			return 'Yes'
		elif l[0] == 0 or l[1] == 0 or l[2] == 0:
			return 'No'
		else:
			return 'Yes'
	else:
		return 'Yes'
x = int(input())
m = []
for i in range(x):
	y = input()
	z = y.split(' ')
	k = [int(t) for t in z]
	m.append(k)
for j in range(x):
	print(pal(m[j]))


n = int(input())
for x in range(n):
	(a, b, c, d) = map(int, input().split())
	k = b % 2 + c % 2 + d % 2 + a % 2
	if k <= 1 or (k >= 3 and a > 0 and (b > 0) and (c > 0)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	nums = list(map(int, input().split()))
	numOdd = 0
	for num in nums:
		if num % 2 != 0:
			numOdd += 1
	if numOdd <= 1:
		print('Yes')
	else:
		possible = True
		for i in range(3):
			nums[i] -= 1
		nums[3] += 3
		numOdd = 0
		for num in nums:
			if num < 0:
				possible = False
				break
			if num % 2 != 0:
				numOdd += 1
		if possible and numOdd <= 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if (r + g + b + w) % 2 == 0:
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
			print('Yes')
		elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 1):
			print('Yes')
		else:
			print('No')
	else:
		x = [r % 2, g % 2, b % 2, w % 2]
		if x.count(1) == 1:
			print('Yes')
		elif x.count(0) == 1 and r > 0 and (g > 0) and (b > 0):
			print('Yes')
		else:
			print('No')


lst = [0, 0, 4, 8]
mod = 10 ** 9 + 7
for i in range(4, 10 ** 6 + 1):
	lst.append(lst[-1] * 2 % mod)

def main(case):
	(r, g, b, w) = map(int, input().split())
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		print('Yes')
	else:
		d = min(r, g, b, 1)
		w += d * 3
		r -= d
		g -= d
		b -= d
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			print('Yes')
		else:
			print('No')
t = int(input())
for i in range(t):
	main(i + 1)


def f(r, g, b, w):
	if len([x for x in [r, g, b, w] if x % 2 == 1]) <= 1:
		return 'Yes'
	if min(r, g, b) > 0 and len([x for x in [r, g, b, w] if x % 2 == 0]) <= 1:
		return 'Yes'
	return 'No'
numberofcases = int(input())
for _ in range(numberofcases):
	(r, g, b, w) = [int(t) for t in input().split()]
	print(f(r, g, b, w))


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from datetime import datetime
init_time = datetime.now()
import math

def solve():
	(r, g, b, w) = map(int, input().split())
	if r == g and r == b and (b == g):
		print('YES')
		return
	minim = min(min(r, g), min(b, w))
	counte = 0
	counto = 0
	if r > 0 and r % 2 == 0:
		counte += 1
	elif r > 0:
		counto += 1
	if g > 0 and g % 2 == 0:
		counte += 1
	elif g > 0:
		counto += 1
	if b > 0 and b % 2 == 0:
		counte += 1
	elif b > 0:
		counto += 1
	if w % 2 == 1:
		counto += 1
	else:
		counte += 1
	if counto <= 1:
		print('YES')
		return
	else:
		if r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 3
		(counto, counte) = (0, 0)
		if r > 0 and r % 2 == 0:
			counte += 1
		elif r > 0:
			counto += 1
		if g > 0 and g % 2 == 0:
			counte += 1
		elif g > 0:
			counto += 1
		if b > 0 and b % 2 == 0:
			counte += 1
		elif b > 0:
			counto += 1
		if w % 2 == 1:
			counto += 1
		else:
			counte += 1
		if counto <= 1:
			print('YES')
			return
	print('NO')
for _ in range(int(input())):
	solve()


a = int(input())
for i in range(0, a):
	(b, c, d, e) = map(int, input().split())
	if b % 2 == 0 and c % 2 == 0 and (d % 2 == 0) or (b % 2 == 0 and c % 2 == 0 and (e % 2 == 0)) or (b % 2 == 0 and d % 2 == 0 and (e % 2 == 0)) or (d % 2 == 0 and c % 2 == 0 and (e % 2 == 0)):
		print('Yes')
	elif b != 0 and c != 0 and (d != 0) and (b % 2 == 1 and c % 2 == 1 and (d % 2 == 1) or (b % 2 == 1 and c % 2 == 1 and (e % 2 == 1)) or (b % 2 == 1 and d % 2 == 1 and (e % 2 == 1)) or (d % 2 == 1 and c % 2 == 1 and (e % 2 == 1))):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	o = r % 2 + g % 2 + b % 2 + w % 2
	if o <= 1:
		print('Yes')
	elif r >= 1 and g >= 1 and (b >= 1):
		o = (r - 1) % 2 + (w + 3) % 2 + (g - 1) % 2 + (b - 1) % 2
		if o <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def es_par(x):
	if x % 2 == 0:
		return True
	return False

def cant_impares(l):
	cant = 0
	for e in l:
		if not es_par(e):
			cant += 1
	return cant
t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	solved = False
	if arr[0] > 0 and arr[1] > 0 and (arr[2] > 0):
		if cant_impares(arr) <= 1:
			solved = True
			print('Yes')
		else:
			arr[0] -= 1
			arr[1] -= 1
			arr[2] -= 1
			arr[3] += 3
	if not solved and cant_impares(arr) <= 1:
		solved = True
		print('Yes')
	if not solved:
		print('No')


for i in range(int(input())):
	arr = [int(x) for x in input().split()]
	temp = [x % 2 for x in arr]
	if sum(temp) <= 1:
		print('yes')
	elif 0 in arr[:3]:
		print('no')
	else:
		arr2 = [x - 1 for x in arr[:3]] + [arr[3] + 1]
		temp = [x % 2 for x in arr2]
		if sum(temp) <= 1:
			print('yes')
		else:
			print('no')


t = int(input())
for test_ceases in range(t):
	l = [int(i) for i in input().split(' ')]
	even_count = 0
	for k in l:
		if k % 2 == 0:
			even_count += 1
	if even_count >= 3:
		print('Yes')
	elif even_count == 1:
		if 0 not in l[:-1]:
			print('Yes')
		else:
			print('No')
	elif even_count == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
col = []
for i in range(n):
	x = input().split()
	col.append(x)
for j in range(n):
	r = col[j][0]
	r = int(r)
	g = col[j][1]
	g = int(g)
	b = col[j][2]
	b = int(b)
	w = col[j][3]
	w = int(w)
	g_o = g % 2
	b_o = b % 2
	r_o = r % 2
	w_o = w % 2
	for k in range(1):
		if (r_o, b_o, r_o, w_o) == (0, 0, 0, 0):
			print('Yes')
			break
		if (r_o, b_o, g_o, w_o) == (1, 0, 0, 0) or (r_o, b_o, g_o, w_o) == (0, 1, 0, 0) or (r_o, b_o, g_o, w_o) == (0, 0, 1, 0) or ((r_o, b_o, g_o, w_o) == (0, 0, 0, 1)):
			print('Yes')
			break
		if r == 0 or g == 0 or b == 0:
			print('No')
			break
		g = g - 1
		r = r - 1
		b = b - 1
		w = w + 3
		g_o = g % 2
		b_o = b % 2
		r_o = r % 2
		w_o = w % 2
		if (r_o, b_o, g_o, w_o) == (1, 0, 0, 0) or (r_o, b_o, g_o, w_o) == (0, 1, 0, 0) or (r_o, b_o, g_o, w_o) == (0, 0, 1, 0) or ((r_o, b_o, g_o, w_o) == (0, 0, 0, 1)):
			print('Yes')
			break
		if (r_o, b_o, r_o, w_o) == (0, 0, 0, 0):
			print('Yes')
			break
		print('No')


def is_even(n):
	return n % 2 == 0

def nu_p(r, b, g, w):
	num_p = 0
	if is_even(r):
		num_p += 1
	if is_even(b):
		num_p += 1
	if is_even(g):
		num_p += 1
	if is_even(w):
		num_p += 1
	return num_p
T = int(input())
my_tab = []
for i in range(T):
	l = list(map(int, input().split(' ')))
	my_tab.append(l)
for l in my_tab:
	r = l[0]
	b = l[1]
	g = l[2]
	w = l[3]
	if nu_p(r, b, g, w) >= 3:
		print('YES')
	else:
		if (r > 0 and b > 0 and (g > 0)) and nu_p(r, b, g, w) < 3:
			r -= 1
			b -= 1
			g -= 1
			w += 1
		if nu_p(r, b, g, w) >= 3:
			print('YES')
		else:
			print('NO')


test_cases = int(input())
for test_case in range(test_cases):
	(r, g, b, w) = list(map(int, input().split()))
	count = 0
	x = min(r, g, b)
	if r % 2 == 0:
		count += 1
	if g % 2 == 0:
		count += 1
	if b % 2 == 0:
		count += 1
	if w % 2 == 0:
		count += 1
	if count >= 3:
		print('Yes')
	elif x == 0:
		print('No')
	elif count <= 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	o = a % 2 + b % 2 + c % 2 + d % 2
	if o <= 1:
		print('Yes')
	elif 4 - o <= 1:
		if a > 0 and b > 0 and (c > 0):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	a = list(map(int, input().split()))
	e = 0
	o = 0
	ze = -1
	for i in range(len(a)):
		if a[i] % 2 == 0:
			e += 1
		else:
			o += 1
		if a[i] == 0 and i != 3:
			ze = i
	if e >= 3 or (o >= 3 and ze == -1):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline

def main():
	(r, g, b, w) = map(int, input().split())
	cnt = 0
	for num in [r, g, b, w]:
		if num % 2 == 1:
			cnt += 1
	if cnt <= 1:
		print('Yes')
		return
	if r == 0 or g == 0 or b == 0:
		print('No')
		return
	if cnt == 2:
		print('No')
	else:
		print('Yes')
t = int(input())
for _ in range(t):
	main()


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	if r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 0 or w % 2 != 0):
		print('Yes')
		continue
	if r % 2 == 0 and b % 2 == 0 and (w % 2 == 0) and (g % 2 == 0 or g % 2 != 0):
		print('Yes')
		continue
	if w % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (r % 2 == 0 or r % 2 != 0):
		print('Yes')
		continue
	if r % 2 == 0 and w % 2 == 0 and (g % 2 == 0) and (b % 2 == 0 or b % 2 != 0):
		print('Yes')
		continue
	flag = 0
	for j in range(2):
		if r > 0 and b > 0 and (g > 0):
			r = r - 1
			b = b - 1
			g = g - 1
			w = w + 3
		if r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 0 or w % 2 != 0):
			print('Yes')
			flag = 1
			break
		if r % 2 == 0 and b % 2 == 0 and (w % 2 == 0) and (g % 2 == 0 or g % 2 != 0):
			print('Yes')
			flag = 1
			break
		if w % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (r % 2 == 0 or r % 2 != 0):
			print('Yes')
			flag = 1
			break
		if r % 2 == 0 and w % 2 == 0 and (g % 2 == 0) and (b % 2 == 0 or b % 2 != 0):
			print('Yes')
			flag = 1
			break
	if flag == 0:
		print('No')


for i in range(int(input())):
	(a, b, c, d) = list(map(int, input().split()))
	t = a % 2 + b % 2 + c % 2 + d % 2
	if t < 2 or (a * b * c and t > 2):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	a = min(r, g, b)
	if a == 0:
		r = r & 1
		g = g & 1
		b = b & 1
		w = w & 1
		if r + g + b + w <= 1:
			print('Yes')
		else:
			print('No')
	else:
		r = r & 1
		g = g & 1
		b = b & 1
		w = w & 1
		if r + g + b + w == 0 or r + g + b + w == 1 or r + g + b + w == 3 or (r + g + b + w == 4):
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	l = [r, g, b, w]
	(c, c1, c2) = (0, 0, 0)
	m = min(r, g, b)
	for i in range(len(l)):
		if l[i] & 1:
			l[i] = 1
		else:
			l[i] = 0
	c = l.count(1)
	if c < 2:
		print('Yes')
		continue
	if m == 0:
		print('No')
		continue
	print('Yes') if 4 - l.count(1) <= 1 else print('No')


def sprawdzanie(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		return True
	else:
		return False
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if sprawdzanie(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and sprawdzanie(r - 1, g - 1, b - 1, w + 1):
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	cList = [r, g, b, w]
	jjak = 0
	hol = 0
	for i in range(len(cList)):
		if cList[i] % 2 == 0:
			jjak += 1
		else:
			hol += 1
	if r * g * b == 0:
		if hol <= 1:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if jjak == 4:
		print('Yes')
		continue
	elif jjak == 3 and hol == 1:
		print('Yes')
		continue
	elif hol == 4:
		print('Yes')
		continue
	elif hol == 3 and jjak == 1:
		print('Yes')
		continue
	else:
		print('No')
		continue


def count_odds(r, g, b, w):
	count = 0
	if r % 2 != 0:
		count += 1
	if g % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	if w % 2 != 0:
		count += 1
	return count

def test_case():
	(r, g, b, w) = (int(number) for number in input().split(' '))
	odds_count = count_odds(r, g, b, w)
	if odds_count == 1 or odds_count == 0:
		print('Yes')
		return
	if odds_count == 2:
		print('No')
		return
	if r == 0 or g == 0 or b == 0:
		print('No')
		return
	print('Yes')

def main():
	t = int(input())
	for x in range(t):
		test_case()
main()


for i in range(int(input())):
	(r, g, b, w) = [int(i) for i in input().split()]
	c = r > 0 and g > 0 and (b > 0)
	answer = 'No' if r % 2 + g % 2 + b % 2 == 2 and w % 2 == 0 or (r % 2 + g % 2 + b % 2 == 1 and w % 2 == 1) or (r % 2 + g % 2 + b % 2 == 2 and (not c)) else 'Yes'
	print(answer)


cases = int(input())
for i in range(cases):
	line = input().split(' ')
	r = int(line[0])
	g = int(line[1])
	b = int(line[2])
	w = int(line[3])
	arr = [r, g, b, w]
	odd = even = 0
	for a in arr:
		if a % 2 == 1:
			odd += 1
		else:
			even += 1
	op = False
	pos = False
	if r > 0 and b > 0 and (g > 0):
		op = True
	if odd <= 1:
		pos = True
	else:
		if op:
			r -= 1
			g -= 1
			b -= 1
			w += 3
		arr = [r, g, b, w]
		odd = even = 0
		for a in arr:
			if a % 2 == 1:
				odd += 1
			else:
				even += 1
		if odd <= 1:
			pos = True
	if pos:
		print('Yes')
	else:
		print('No')


def checkRGB(r, g, b, w):
	return False if r % 2 + g % 2 + b % 2 + w % 2 > 1 else True
for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	l = [a, b, c, d]
	e = 0
	for i in l:
		if i % 2 != 0:
			e += 1
	if checkRGB(a, b, c, d):
		print('Yes')
	elif a * b * c > 0 and checkRGB(a - 1, b - 1, c - 1, d + 1):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	k = min(r, b, g)
	flag = 0
	if r % 2 == 1:
		flag += 1
	if g % 2 == 1:
		flag += 1
	if b % 2 == 1:
		flag += 1
	if w % 2 == 1:
		flag += 1
	if flag == 0 or flag == 1:
		print('Yes')
	elif flag == 3 and k >= 1:
		print('Yes')
	elif flag == 4 and k >= 1:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def toord(c):
	return ord(c) - ord('a')

def lcm(a, b):
	return a * b // lcm(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		arr = RLL()
		rec = 0
		for i in arr:
			if i % 2 == 1:
				rec += 1
		rec1 = 0
		arr1 = [arr[0] - 1, arr[1] - 1, arr[2] - 1, arr[3] + 3]
		tag = True
		for i in arr1:
			if i % 2 == 1:
				rec1 += 1
			if i < 0:
				tag = False
		if (rec == 0 or rec == 1) or (tag and (rec1 == 0 or rec1 == 1)):
			print('Yes')
		else:
			print('No')
main()


def gns():
	return list(map(int, input().split()))
t = int(input())
for i in range(t):
	ns = gns()
	odd = 0
	evn = 0
	for c in ns:
		if c % 2 == 0:
			evn += 1
		else:
			odd += 1
	if ns[0] * ns[1] * ns[2] == 0:
		if odd <= 1:
			print('YES')
			continue
		else:
			print('NO')
			continue
	if evn == 2:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	countodd = 0
	for i in [r, g, b, w]:
		if i % 2 == 1:
			countodd += 1
	if countodd == 2:
		print('No')
	elif countodd == 0 or countodd == 1:
		print('Yes')
	elif min(r, g, b) == 0:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().strip().split(' '))
	even = 0
	if r % 2 == 0:
		even += 1
	if g % 2 == 0:
		even += 1
	if b % 2 == 0:
		even += 1
	if even == 3 or even == 0:
		print('YES')
	elif even == 2 and w % 2 == 0:
		print('Yes')
	elif w % 2 != 0 and even == 2:
		print('NO')
	elif r <= 0 or g <= 0 or b <= 0:
		print('NO')
	elif w % 2 == 0 and even == 2:
		print('YES')
	elif w % 2 == 0 and even == 1:
		print('NO')
	elif w % 2 != 0 and even == 1:
		print('YES')


import sys
input = sys.stdin.readline

def inInt():
	return int(input())

def inStr():
	return input().strip('\n')

def inIList():
	return list(map(int, input().split()))

def inSList():
	return input().split()

def isPal(c):
	odd = 0
	for n in c:
		odd += n % 2 == 1
	if odd <= 1:
		return True
	elif odd == 3:
		return c[0] > 0 and c[1] > 0 and (c[2] > 0)
	elif odd == 4:
		return True

def solve(c):
	if isPal(c):
		print('Yes')
	else:
		print('No')
t = inInt()
for c in range(t):
	case = inIList()
	solve(case)


import sys
from decimal import Decimal
import math
from collections import Counter
import bisect
from itertools import combinations
MOD = 10 ** 6 + 7
INF = 10 ** 9
PI = 3.141592653589793

def read_str():
	return sys.stdin.readline().strip()

def read_int():
	return int(sys.stdin.readline().strip())

def read_ints():
	return map(int, sys.stdin.readline().strip().split())

def read_str_list():
	return list(sys.stdin.readline().strip().split())

def read_int_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def lcm(a: int, b: int) -> int:
	return a * b // math.gcd(a, b)

def Main():
	for _ in range(int(input())):
		(r, g, b, w) = read_ints()
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
			print('Yes')
		elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 1):
			print('Yes')
		elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 1) and (b > 0):
			print('Yes')
		elif r % 2 == 1 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 1) and (g > 0):
			print('Yes')
		elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 1) and (r > 0):
			print('Yes')
		elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0):
			print('Yes')
		elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0):
			print('Yes')
		elif r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
			print('Yes')
		else:
			print('No')
Main()


def soln(w, r, g, b):
	br = r % 2 != 0
	bw = w % 2 != 0
	bg = g % 2 != 0
	bb = b % 2 != 0
	count = 0
	if br:
		count += 1
	if bg:
		count += 1
	if bb:
		count += 1
	if bw:
		count += 1
	if count == 2:
		return 'NO'
	else:
		if r == 0 or g == 0 or b == 0:
			if count <= 1:
				return 'YES'
			else:
				return 'NO'
		return 'YES'
t = int(input())
while t > 0:
	t -= 1
	(r, g, b, w) = [int(x) for x in input().split()]
	print(soln(w, r, g, b))


for t in range(int(input())):
	a = list(map(int, input().split()))
	flag1 = 0
	flag2 = 0
	even = 0
	odd = 0
	for i in range(4):
		if i < 3:
			if a[i] == 0:
				flag1 = 1
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	odd_ = 0
	even_ = 0
	p = 1
	q = 0
	if even == odd:
		print('No')
	elif even == 0 or odd == 0:
		print('Yes')
	elif even > odd:
		print('Yes')
	elif a[3] % 2 == 0:
		print('Yes')
	elif flag1 == 0:
		print('Yes')
	else:
		print('No')


def main():
	n = int(input())
	num_list = [[0] * 4] * n
	for i in range(0, n):
		num_list[i] = input().split(' ')
		num_list[i] = [int(j) for j in num_list[i]]
	for i in range(0, n):
		r = num_list[i][0]
		g = num_list[i][1]
		b = num_list[i][2]
		w = num_list[i][3]
		result = conversion(r, g, b, w)
		if result:
			print('Yes')
		else:
			print('No')

def conversion(r, g, b, w):
	if palindrome(r, g, b, w) == True:
		return True

def palindrome(r, g, b, w):
	uneven = 0
	if r % 2 == 1:
		uneven = uneven + 1
	if g % 2 == 1:
		uneven = uneven + 1
	if b % 2 == 1:
		uneven = uneven + 1
	if w % 2 == 1:
		uneven = uneven + 1
	if r >= 1 and g >= 1 and (b >= 1):
		if uneven <= 1 or uneven >= 3:
			return True
		else:
			return False
	elif uneven <= 1:
		return True
	else:
		return False
main()


for _ in range(int(input())):
	(a, b, c, d) = [int(i) for i in input().split()]
	ans = 'NO'
	if a % 2 + b % 2 + c % 2 + d % 2 < 2:
		ans = 'YES'
	if a and b and c:
		a -= 1
		b -= 1
		c -= 1
		d += 3
	if a % 2 + b % 2 + c % 2 + d % 2 < 2:
		ans = 'YES'
	print(ans)


t = int(input())
for _ in range(t):
	(a, b, c, d) = list(map(int, input().split()))
	a = [a, b, c]
	a.sort()
	(a, b, c) = (a[0], a[1], a[2])
	if a == 0:
		even = 0
		if b % 2 == 0:
			even += 1
		if c % 2 == 0:
			even += 1
		if d % 2 == 0:
			even += 1
		if even == 2 or even == 3:
			print('YES')
		else:
			print('NO')
	else:
		even = 0
		if a % 2 == 0:
			even += 1
		if b % 2 == 0:
			even += 1
		if c % 2 == 0:
			even += 1
		if d % 2 == 0:
			even += 1
		if even == 3 or even == 4:
			print('YES')
		elif even == 1 or even == 0:
			print('YES')
		else:
			print('NO')


def check(r, g, b, w):
	count = 0
	if r & 1:
		count += 1
	if g & 1:
		count += 1
	if b & 1:
		count += 1
	if w & 1:
		count += 1
	if count > 1:
		return False
	return True
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if check(r, g, b, w):
		print('Yes')
		continue
	(r, g, b, w) = (r - 1, g - 1, b - 1, w + 3)
	if r < 0 or g < 0 or b < 0:
		print('No')
		continue
	if check(r, g, b, w):
		print('Yes')
		continue
	print('No')


n = int(input())
for i in range(n):
	(r, g, b, w) = map(int, input().split())
	l = [r % 2, g % 2, b % 2].count(1)
	if l == 0 or (l == 1 and w % 2 == 0) or l == 3 or (l == 2 and w % 2 == 1 and min(r, g, b)):
		print('Yes')
	else:
		print('No')


import sys

def solve(r, g, b, w):
	possible = False
	OE = [x % 2 for x in [r, g, b, w]]
	if sum(OE) == 0 or sum(OE) == 1:
		possible = True
	elif r > 0 and g > 0 and (b > 0):
		if sum(OE[:3]) == 1:
			pass
		elif sum(OE[:3]) == 2:
			possible = OE[3] == 1
		elif sum(OE[:3]) == 3:
			possible = True
	return 'Yes' if possible else 'No'
IN = [x.strip() for x in sys.stdin.readlines()]
T = int(IN[0])
cur = 0
for ti in range(T):
	(r, g, b, w) = [int(x) for x in IN[cur + 1].split(' ')]
	res = solve(r, g, b, w)
	print(res)
	cur += 1


from sys import stdin, stdout
from math import gcd, sqrt, factorial
from collections import deque, defaultdict
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 0 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	a = L()
	if 0 in a[:3]:
		v = [0, 0]
		for i in a:
			v[i & 1] += 1
		print('NO' if v[1] > 1 else 'YES')
	else:
		v = [0, 0]
		for i in a:
			v[i & 1] += 1
		print('NO' if min(v) > 1 else 'YES')


def checkValid(txt):
	odds = 0
	for clr in txt:
		if int(clr) % 2 != 0:
			odds += 1
	colored = txt[0:3]
	if odds == 0 or odds == 1:
		print('Yes')
	elif '0' in colored:
		print('No')
	elif '0' not in colored:
		if odds == 3 or odds == 4:
			print('Yes')
		else:
			print('No')
for i in range(0, int(input())):
	inp = input()
	txt = inp.split(' ')
	checkValid(txt)


for _ in range(int(input())):
	c = list(map(int, input().split()))
	even = 0
	odd = 0
	for cor in c:
		if cor % 2 == 1:
			odd += 1
		else:
			even += 1
	if even == 4 or odd == 1:
		print('Yes')
	elif (odd == 4 or even == 1) and 0 not in c[:-1]:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if i % 2:
			c = c + 1
	if c <= 1:
		print('Yes')
	else:
		c = 0
		for i in range(3):
			if l[i] > 0:
				l[i] = l[i] - 1
				c = c + 1
		if c == 3:
			c = 0
			l[-1] = l[-1] + 3
			for i in l:
				if i % 2:
					c = c + 1
			if c == 0 or c == 1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


import math

def dtb(n):
	return bin(n).replace('0b', '')

def btd(n):
	return int(n, 2)
t = int(input())
for k in range(t):
	count = 0
	f = 0
	a = list(map(int, input().split()))[:4]
	for i in range(4):
		if a[i] % 2 == 1:
			count += 1
	if count == 1 or count == 0:
		print('YES')
	else:
		for i in range(3):
			if a[i] == 0:
				print('NO')
				f = 1
				break
		if f == 1:
			continue
		a[0] -= 1
		a[1] -= 1
		a[2] -= 1
		a[3] += 3
		count = 0
		for i in range(4):
			if a[i] % 2 == 1:
				count += 1
		if count == 0 or count == 1:
			print('YES')
		else:
			print('NO')


n = int(input())
for _ in range(n):
	t = list(map(int, input().split()))
	d = 0
	for i in t:
		if i & 1:
			d += 1
	if d <= 1:
		print('Yes')
	elif d > 1 and min(t[0], t[1], t[2]) == 0:
		print('No')
	else:
		c = 0
		for i in range(len(t) - 1):
			t[i] -= 1
		t[3] += 3
		for i in t:
			if i & 1:
				c += 1
		if c > 1:
			print('No')
		else:
			print('Yes')


import io
import os
import sys
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def prdbg(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def get_str():
	return input().decode().strip()

def rint():
	return map(int, input().split())

def oint():
	return int(input())
t = oint()
for _ in range(t):
	(r, g, b, w) = rint()
	rr = r % 2
	gg = g % 2
	bb = b % 2
	ww = w % 2
	if rr + gg + bb + ww <= 1:
		print('YES')
	elif rr + gg + bb == 3:
		print('YES')
	elif rr + gg + bb == 2 and ww == 1 and (r * g * b != 0):
		print('YES')
	else:
		print('NO')


def check(r, g, b, w):
	return False if r % 2 + g % 2 + b % 2 + w % 2 > 1 else True
T = int(input())
for ttt in range(T):
	(r, g, b, w) = map(int, input().split())
	if check(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and check(r - 1, g - 1, b - 1, w + 3):
		print('Yes')
	else:
		print('No')


def solve():
	(r, g, b, w) = map(int, input().split())
	if r % 2 + g % 2 + b % 2 + w % 2 < 2:
		print('Yes')
	else:
		l = [r, g, b]
		if l.count(0) == 0:
			if (r - 1) % 2 + (g - 1) % 2 + (b - 1) % 2 + (w + 1) % 2 < 2:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
for _ in range(int(input())):
	solve()


res = ''
for _ in range(int(input())):
	a = list(map(int, input().split()))
	b = [x for x in a if x % 2]
	if len(b) <= 1:
		res += 'Yes\n'
		continue
	if min(a[:3]) > 0:
		b = [x for x in a if not x % 2]
		if len(b) <= 1:
			res += 'Yes\n'
			continue
	res += 'No\n'
print(res)


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if r < 1 or g < 1 or b < 1:
		if r % 2 + g % 2 + b % 2 + w % 2 > 1:
			print('No')
		else:
			print('Yes')
	else:
		d = r % 2 + g % 2 + b % 2 + w % 2
		if d != 2:
			print('Yes')
		else:
			print('No')


from collections import deque as dq
from collections import defaultdict as dd
from collections import Counter as ct
from functools import lru_cache as lc
from heapq import heappush as hpush, heappop as hpop, heapify as hfy
from bisect import bisect_left, bisect_right
import itertools as it
import math
import sys
input = sys.stdin.readline

def solve():
	(R, G, B, W) = map(int, input().split())

	def get_odd_cnt():
		return R % 2 + G % 2 + B % 2 + W % 2
	if get_odd_cnt() <= 1:
		print('Yes')
	elif R == 0 or G == 0 or B == 0:
		print('No')
	elif 4 - get_odd_cnt() <= 1:
		print('Yes')
	else:
		print('No')
t = int(input())
for i in range(t):
	solve()


def check(a, b, c, d):
	if not (a >= 0 and b >= 0 and (c >= 0) and (d >= 0)):
		return False
	return sum((t % 2 for t in [a, b, c, d])) <= 1
for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	for t in range(10):
		if check(a - t, b - t, c - t, d + t * 3):
			print('Yes')
			break
	else:
		print('No')


x = int(input())
y = []
for i in range(x):
	y.append(input().split())
for i in y:
	cnt = 0
	for j in range(4):
		if int(i[j]) % 2 == 0:
			cnt += 1
	if cnt == 4 or cnt == 0 or cnt == 3:
		print('Yes')
	elif cnt == 2:
		print('No')
	elif cnt == 1:
		for j in range(3):
			if int(i[j]) == 0:
				print('No')
				break
		else:
			print('Yes')


def boboniu(array):
	r = array[0]
	g = array[1]
	b = array[2]
	w = array[3]
	oddcount = 0
	evencount = 0
	for x in array:
		if x % 2 == 0:
			evencount += 1
		elif x % 2 == 1:
			oddcount += 1
	if oddcount == 0 or oddcount == 1:
		return 'YES'
	elif oddcount == 2:
		return 'NO'
	elif oddcount == 3:
		if min(r, g, b) > 0:
			return 'YES'
		else:
			return 'NO'
	else:
		return 'YES'
t = int(input())
array = []
for i in range(t):
	array.append(list(map(int, input().split(' '))))
for x in array:
	print(boboniu(x))


def solve():
	(r, g, b, w) = map(int, input().split())
	o = 0
	e = 0
	if r % 2 == 0:
		e += 1
	else:
		o += 1
	if g % 2 == 0:
		e += 1
	else:
		o += 1
	if b % 2 == 0:
		e += 1
	else:
		o += 1
	if w % 2 == 0:
		e += 1
	else:
		o += 1
	if r == 0 or g == 0 or b == 0:
		if o < 2:
			print('Yes')
		else:
			print('No')
	elif o == 2:
		print('No')
	else:
		print('Yes')
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split(' '))
	val = min(r, g, b)
	if r % 2 + g % 2 + b % 2 + w % 2 < 2:
		print('Yes')
	elif val != 0 and (r - 1) % 2 + (g - 1) % 2 + (b - 1) % 2 + (w + 1) % 2 < 2:
		print('Yes')
	else:
		r -= val
		g -= val
		b -= val
		w += val
		if r % 2 + g % 2 + b % 2 + w % 2 < 2:
			print('Yes')
		else:
			print('No')


t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	(r, g, b, w) = [int(i) for i in input().split()]
	if (r + g + b + w) % 2 == 0:
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0) or (r % 2 == 1 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 1)):
			print('Yes')
		else:
			print('No')
	elif w % 2 == 1:
		if r % 2 == 1 or g % 2 == 1 or b % 2 == 1:
			if r > 0 and g > 0 and (b > 0):
				print('Yes')
			else:
				print('No')
		else:
			print('Yes')
	elif r % 2 == 0 or g % 2 == 0 or b % 2 == 0:
		print('Yes')
	elif r > 0 and g > 0 and (b > 0):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	q = list(map(int, input().split()))
	r = q[0]
	g = q[1]
	b = q[2]
	w = q[3]
	odev = [r % 2, g % 2, b % 2, w % 2]
	if odev.count(0) > 2 or odev.count(0) == 0:
		print('YES')
	elif r > 0 and b > 0 and (g > 0):
		r -= 1
		b -= 1
		g -= 1
		w += 3
		odev = [r % 2, g % 2, b % 2, w % 2]
		if odev.count(0) > 2 or odev.count(0) == 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	s = sum([i % 2 for i in l])
	if s in [0, 1, 4]:
		print('Yes')
	elif s == 2:
		print('No')
	elif 0 in l[:3]:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	num = sum([r % 2, g % 2, b % 2, w % 2]) % 4
	if num <= 1:
		print('YES')
	elif num == 3 and min([r, g, b]) > 0:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	arr = list(map(int, input().split()))
	f1 = 0
	f2 = 0
	f3 = 0
	if arr[0] % 2 != 0:
		f1 = 1
	if arr[1] % 2 != 0:
		f2 = 1
	if arr[2] % 2 != 0:
		f3 = 1
	if f1 + f2 + f3 == 0:
		print('Yes')
	elif f1 + f2 + f3 == 1 and arr[3] % 2 == 0:
		print('Yes')
	elif f1 + f2 + f3 == 1 and arr[3] % 2 != 0:
		print('No')
	elif f1 + f2 + f3 == 2 and arr[3] % 2 == 0:
		print('No')
	elif f1 + f2 + f3 == 2 and arr[3] % 2 != 0:
		if arr[0] == 0 or arr[1] == 0 or arr[2] == 0:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	l = [r % 2 == 0, g % 2 == 0, b % 2 == 0]
	(e, o, ans) = (l.count(True), l.count(False), 'Yes')
	if w % 2 == 0:
		if e == 1:
			ans = 'No'
	else:
		if e == 2:
			ans = 'No'
		if e == 1:
			if r == 0 or b == 0 or g == 0:
				ans = 'No'
	print(ans)


tests = int(input())
for i in range(tests):
	odds = 0
	evens = 0
	colors = [int(x) for x in input().split()]
	for x in colors[:-1]:
		if x % 2 == 0:
			evens += 1
		else:
			odds += 1
	m = min(colors[:-1])
	k = 0
	while odds > 1 and k != m:
		k += 1
		(evens, odds) = (odds, evens)
	colors[3] += k * 3
	if colors[3] % 2 != 0:
		odds += 1
	if odds <= 1:
		print('Yes')
	else:
		print('No')


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass
for _ in range(L()[0]):
	(r, g, b, w) = L()
	x = min(r, g, b)
	x = r % 2 + g % 2 + b % 2
	if x == 3:
		print('Yes')
	elif x == 2 and min(r, g, b) and w % 2:
		print('Yes')
	elif x == 1 and w % 2 == 0:
		print('Yes')
	elif x == 0:
		print('Yes')
	else:
		print('No')


import sys
import string
import math
from collections import defaultdict
from functools import lru_cache
from collections import Counter

def mi(s):
	return map(int, s.strip().split())

def lmi(s):
	return list(mi(s))

def tmi(s):
	return tuple(mi(s))

def mf(f, s):
	return map(f, s)

def lmf(f, s):
	return list(mf(f, s))

def js(lst):
	return ' '.join((str(d) for d in lst))

def line():
	return sys.stdin.readline().strip()

def linesp():
	return line().split()

def iline():
	return int(line())

def mat(n):
	matr = []
	for _ in range(n):
		matr.append(linesp())
	return matr

def mati(n):
	mat = []
	for _ in range(n):
		mat.append(lmi(line()))
	return mat

def dist(x, y):
	return ((x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2) ** 0.5

def fast_exp(x, n):
	if n == 0:
		return 1
	elif n % 2 == 1:
		return x * fast_exp(x, (n - 1) // 2) ** 2
	else:
		return fast_exp(x, n // 2) ** 2

def three(r, g, b, w):
	return [r % 2 == 0, g % 2 == 0, b % 2 == 0, w % 2 == 0].count(True) >= 3

def solve(r, g, b, w):
	(r_1, g_1, b_1, w_1) = (1, 1, 1, 1)
	if r > 0 and g > 0 and (b > 0):
		(r_1, g_1, b_1, w_1) = (r - 1, g - 1, b - 1, w + 1)
	if three(r, g, b, w) or three(r_1, g_1, b_1, w_1):
		print('YES')
	else:
		print('NO')

def main(cases):
	for case in cases:
		solve(*case)
t = iline()
cases = []
for _ in range(t):
	cases.append(lmi(line()))
main(cases)


from __future__ import division, print_function
import math
import os
import sys
from fractions import *
from sys import *
from decimal import *
from io import BytesIO, IOBase
from itertools import *
from collections import *
M = 10 ** 9 + 7
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def regularbracket(t):
	p = 0
	for i in t:
		if i == '(':
			p += 1
		else:
			p -= 1
		if p < 0:
			return False
	else:
		if p > 0:
			return False
		else:
			return True

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def reverse1(string):
	pp = ''
	for i in string[::-1]:
		pp += i
	if pp == string:
		return True
	return False

def reverse2(list1):
	l = []
	for i in list1[::-1]:
		l.append(i)
	if l == list1:
		return True
	return False

def mex(list1):
	p = max(list1) + 1
	for i in range(len(list1)):
		if list1[i] != i:
			p = i
			break
	return p

def sumofdigits(n):
	n = str(n)
	s1 = 0
	for i in n:
		s1 += int(i)
	return s1

def perfect_square(n):
	s = math.sqrt(n)
	if s == int(s):
		return True
	return False

def roman_number(x):
	if x > 15999:
		return
	value = [5000, 4000, 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
	symbol = ['F', 'MF', 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
	roman = ''
	i = 0
	while x > 0:
		div = x // value[i]
		x = x % value[i]
		while div:
			roman += symbol[i]
			div -= 1
		i += 1
	return roman

def soretd(s):
	for i in range(1, len(s)):
		if s[i - 1] > s[i]:
			return False
	return True

def countRhombi(h, w):
	ct = 0
	for i in range(2, h + 1, 2):
		for j in range(2, w + 1, 2):
			ct += (h - i + 1) * (w - j + 1)
	return ct

def countrhombi2(h, w):
	return h * h // 4 * (w * w // 4)

def binpow(a, b):
	if b == 0:
		return 1
	else:
		res = binpow(a, b // 2)
	if b % 2 != 0:
		return res * res * a
	else:
		return res * res

def binpowmodulus(a, b, m):
	a %= m
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a = a * a % m
		b >>= 1
	return res

def coprime_to_n(n):
	result = n
	i = 2
	while i * i <= n:
		if n % i == 0:
			while n % i == 0:
				n //= i
			result -= result // i
		i += 1
	if n > 1:
		result -= result // n
	return result

def prime(x):
	if x == 1:
		return False
	else:
		for i in range(2, int(math.sqrt(x)) + 1):
			if x % i == 0:
				return False
		else:
			return True

def luckynumwithequalnumberoffourandseven(x, n, a):
	if x >= n and str(x).count('4') == str(x).count('7'):
		a.append(x)
	elif x < 1000000000000.0:
		luckynumwithequalnumberoffourandseven(x * 10 + 4, n, a)
		luckynumwithequalnumberoffourandseven(x * 10 + 7, n, a)
	return a

def luckynum(x, l, r, a):
	if x >= l and x <= r:
		a.append(x)
	if x > r:
		a.append(x)
		return a
	if x < 10000000000.0:
		luckynum(x * 10 + 4, l, r, a)
		luckynum(x * 10 + 7, l, r, a)
	return a

def luckynuber(x, n, a):
	p = set(str(x))
	if len(p) <= 2:
		a.append(x)
	if x < n:
		luckynuber(x + 1, n, a)
	return a

def interact(type, x):
	if type == 'r':
		inp = input()
		return inp.strip()
	else:
		print(x, flush=True)

def findTrailingZeros(n):
	count = 0
	while n >= 5:
		n //= 5
		count += n
	return count

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = j = k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i += 1
			else:
				arr[k] = R[j]
				j += 1
			k += 1
		while i < len(L):
			arr[k] = L[i]
			i += 1
			k += 1
		while j < len(R):
			arr[k] = R[j]
			j += 1
			k += 1
res = set()

def solven(p, l, a, b, n):
	if p > n or l > 10:
		return
	if p > 0:
		res.add(p)
	solven(p * 10 + a, l + 1, a, b, n)
	solven(p * 10 + b, l + 1, a, b, n)

def subsetsUtil(A, subset, index, d):
	print(*subset)
	s = sum(subset)
	d.append(s)
	for i in range(index, len(A)):
		subset.append(A[i])
		subsetsUtil(A, subset, i + 1, d)
		subset.pop(-1)
	return d

def subsetSums(arr, l, r, d, sum=0):
	if l > r:
		d.append(sum)
		return
	subsetSums(arr, l + 1, r, d, sum + arr[l])
	subsetSums(arr, l + 1, r, d, sum)
	return d

def print_factors(x):
	factors = []
	for i in range(1, x + 1):
		if x % i == 0:
			factors.append(i)
	return factors

def calc(X, d, ans, D):
	if len(X) == 0:
		return
	i = X.index(max(X))
	ans[D[max(X)]] = d
	Y = X[:i]
	Z = X[i + 1:]
	calc(Y, d + 1, ans, D)
	calc(Z, d + 1, ans, D)

def factorization(n, l):
	c = n
	if prime(n) == True:
		l.append(n)
		return l
	for i in range(2, c):
		if n == 1:
			break
		while n % i == 0:
			l.append(i)
			n = n // i
	return l

def good(b):
	l = []
	i = 0
	while len(b) != 0:
		if b[i] < b[len(b) - 1 - i]:
			l.append(b[i])
			b.remove(b[i])
		else:
			l.append(b[len(b) - 1 - i])
			b.remove(b[len(b) - 1 - i])
	if l == sorted(l):
		return True
	return False

def generate(st, s):
	if len(s) == 0:
		return
	if s not in st:
		st.add(s)
		for i in range(len(s)):
			t = list(s).copy()
			t.remove(s[i])
			t = ''.join(t)
			generate(st, t)
	return

def largestincreasingsubsequence(A):
	l = [1] * len(A)
	sub = []
	for i in range(1, len(l)):
		for k in range(i):
			if A[k] < A[i]:
				sub.append(l[k])
		l[i] = 1 + max(sub, default=0)
	return max(l, default=0)

def findOR(nums, N):
	prefix_sum = 0
	result = 0
	for i in range(N):
		result |= nums[i]
		prefix_sum += nums[i]
		result |= prefix_sum
	return result

def OR(a, n):
	ans = a[0]
	for i in range(1, n):
		ans |= a[i]
	return ans

def toString(List):
	return ''.join(List)
p = []

def permute(a, l, r):
	if l == r:
		p.append(toString(a))
	else:
		for i in range(l, r + 1):
			(a[l], a[i]) = (a[i], a[l])
			permute(a, l + 1, r)
			(a[l], a[i]) = (a[i], a[l])

def main():
	for _ in range(inpu()):
		(r, g, b, w) = sep()
		cnt = r % 2 + g % 2 + b % 2 + w % 2
		if cnt == 2 or (cnt > 2 and r * g * b == 0):
			print('No')
		else:
			print('Yes')
main()


import io
import os
from collections import Counter, defaultdict, deque

def solve(R, G, B, W):
	A = [R, G, B, W]
	parity = Counter((x % 2 for x in A))
	if parity[1] <= 1:
		return 'Yes'
	if R >= 1 and G >= 1 and (B >= 1):
		parity = Counter(((x + 1) % 2 for x in A))
		if parity[1] <= 1:
			return 'Yes'
	return 'No'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = int(input())
for tc in range(1, TC + 1):
	(R, G, B, W) = [int(x) for x in input().split()]
	ans = solve(R, G, B, W)
	print(ans)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	a = [*map(int, input().split())]
	b = sum((1 if x % 2 else 0 for x in a))
	if b in (0, 1, 4):
		print('Yes')
	elif b == 2:
		print('No')
	elif sum((1 for x in a[0:3] if x % 2)) == 3:
		print('Yes')
	elif a[0] * a[1] * a[2]:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	ar = [int(i) for i in input().strip().split(' ')]
	k = [i % 2 for i in ar]
	c = 0
	for i in k:
		if i % 2 == 1:
			c += 1
	if ar[0] == 0 or ar[1] == 0 or ar[2] == 0:
		if c == 1 or c == 0:
			print('Yes')
		else:
			print('No')
	elif c == 2:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	x = input().split()
	r = int(x[0])
	g = int(x[1])
	b = int(x[2])
	w = int(x[3])
	m = min(r, g, b)
	count = 0
	if r % 2 != 0:
		count += 1
	if g % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	if w % 2 != 0:
		count += 1
	if count != 2 and r > 0 and (b > 0) and (g > 0) and (w > 0):
		print('Yes')
		continue
	r = r - m
	g -= m
	b -= m
	w = w + m * 3
	count = 0
	if r % 2 != 0:
		count += 1
	if g % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	if w % 2 != 0:
		count += 1
	if count <= 1:
		print('Yes')
	else:
		print('No')


def ch(r, g, b, w):
	c = 0
	if r % 2:
		c += 1
	if g % 2:
		c += 1
	if b % 2:
		c += 1
	if w % 2:
		c += 1
	return c
for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	co = ch(r, g, b, w)
	if co > 1:
		m = 0
		for i in range(min([r, g, b])):
			if m == 10:
				print('NO')
				break
			r -= 1
			g -= 1
			b -= 1
			w += 3
			if ch(r, g, b, w) <= 1:
				print('YES')
				break
			m += 1
		else:
			print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	a = list(map(int, input().split()))
	parity = []
	for i in a:
		if i % 2:
			parity.append('o')
		else:
			parity.append('e')
	o = parity.count('o')
	if o == 2 or (o == 3 and a[0] * a[1] * a[2] == 0):
		print('No')
	else:
		print('Yes')


t = int(input())

def check(l):
	res = 0
	for i in range(4):
		if l[i] < 0:
			return False
		res += l[i] & 1
	return res <= 1
for _ in range(t):
	l = list(map(int, input().split()))
	if check(l):
		print('Yes')
		continue
	for i in range(3):
		l[i] -= 1
	l[3] += 3
	if check(l):
		print('Yes')
		continue
	print('No')


import sys
import random
import bisect
from collections import deque
from queue import PriorityQueue
from math import gcd
input_ = lambda : sys.stdin.readline().strip('\r\n')
ii = lambda : int(input_())
il = lambda : list(map(int, input_().split()))
ilf = lambda : list(map(float, input_().split()))
ip = lambda : input_()
fi = lambda : float(input_())
ap = lambda ab, bc, cd: ab[bc].append(cd)
li = lambda : list(input_())
pr = lambda x: print(x)
prinT = lambda x: print(x)
f = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7
for _ in range(ii()):
	(r, g, b, w) = il()
	t = r % 2 + g % 2 + b % 2 + w % 2
	if t < 2 or (r * g * b and t > 2):
		print('YES')
	else:
		print('NO')


def mi():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return input().split()
t = ii()
for _ in range(t):
	(r, g, b, w) = mi()
	s = r + g + b + w
	ma = min(r, g, b, 2)
	i = 0
	ans = False
	if r == g and r == b:
		ans = True
	while i <= ma:
		(tr, tg, tb, tw) = (r, g, b, w)
		tr -= i
		tg -= i
		tb -= i
		tw = w + 3 * i
		s = tr + tw + tb + tg
		odd = 0
		for j in [tw, tr, tb, tg]:
			if j % 2 != 0:
				odd += 1
		if s % 2 == 0 and odd == 0:
			ans = True
			break
		elif odd == 1:
			ans = True
			break
		i += 1
	if ans:
		print('Yes')
	else:
		print('No')


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]
MOD = 1000000000 + 7
for _ in range(int(input())):
	(r, g, b, w) = ilele()
	k = 10
	f = 0
	while k > 0 and min(r, g, b) >= 0:
		if w % 2 == 0 and r % 2 == 0 and (g % 2 == 0) and (b % 2 == 0):
			f = 1
			break
		if w % 2 == 0 and r % 2 != 0 and (g % 2 == 0) and (b % 2 == 0):
			f = 1
			break
		if w % 2 == 0 and r % 2 == 0 and (g % 2 != 0) and (b % 2 == 0):
			f = 1
			break
		if w % 2 == 0 and r % 2 == 0 and (g % 2 == 0) and (b % 2 != 0):
			f = 1
			break
		if w % 2 != 0 and r % 2 == 0 and (g % 2 == 0) and (b % 2 == 0):
			f = 1
			break
		else:
			r -= 1
			g -= 1
			b -= 1
			w += 3
		k -= 1
	if f == 1:
		print('Yes')
	else:
		print('No')


t = int(input(''))
arr = []
for i in range(t):
	arr.append(list(map(int, input().split())))
for i in arr:
	r = i[0]
	g = i[1]
	b = i[2]
	w = i[3]
	n1 = 0
	for j in i:
		if j == 1:
			n1 += 1
	if w == 1:
		n1 -= 1
	s = r % 2 + g % 2 + b % 2 + w % 2
	if s == 4 or s == 0 or s == 1:
		print('Yes')
		continue
	det = r and g and b
	if s == 3 and det:
		print('Yes')
		continue
	print('No')


import sys, threading, os.path
import string
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)

def main():
	if os.path.exists('in.rtf'):
		input = open('in.rtf', 'r')
	else:
		input = sys.stdin
	T = int(input.readline())
	results = []
	for i in range(T):
		lis = list(map(int, input.readline().split()))
		num_of_odds = 0
		for x in lis:
			if x % 2 == 1:
				num_of_odds += 1
		if num_of_odds <= 1:
			results.append('Yes')
			continue
		if lis[0] == 0 or lis[1] == 0 or lis[2] == 0:
			results.append('No')
			continue
		lis[0] -= 1
		lis[1] -= 1
		lis[2] -= 1
		lis[3] += 3
		num_of_odds = 0
		for x in lis:
			if x % 2 == 1:
				num_of_odds += 1
		if num_of_odds <= 1:
			results.append('Yes')
		else:
			results.append('No')
	output = '\n'.join(map(str, results))
	if os.path.exists('out.rtf'):
		open('out.rtf', 'w').writelines(str(output))
	else:
		sys.stdout.write(str(output))
main()


def f(r, g, b, w):
	z = [x for x in [r, g, b, w] if x % 2 == 0]
	if len(z) >= 3:
		return True
	if r < 1 or g < 1 or b < 1:
		return False
	if len(z) <= 1:
		return True
t = int(input().strip())
for i in range(t):
	(r, g, b, w) = [int(x) for x in input().strip().split(' ')]
	if f(r, g, b, w):
		print('Yes')
	else:
		print('No')


for i in [*open(0)][1:]:
	m = [i for i in map(int, i.split())]
	ans = 0
	for i in m:
		if i & 1:
			ans += 1
	if 0 in m[0:3] and ans > 1:
		print('NO')
	elif ans == 2:
		print('NO')
	else:
		print('YES')


def main():
	t = int(input())
	for i in range(t):
		val = list(map(int, input().split()))
		count = 0
		for i in val:
			if i % 2 == 1:
				count += 1
		if count == 0 or count == 1 or count == 4:
			print('YES')
		elif count == 2:
			minimum = min(val[:3])
			val[0] -= minimum
			val[1] -= minimum
			val[2] -= minimum
			val[3] += minimum * 3
			count = 0
			for i in val:
				if i % 2 == 1:
					count += 1
			if count == 0 or count == 1:
				print('YES')
			else:
				print('NO')
		elif count == 3:
			minimum = min(val[:3])
			if minimum > 0:
				print('YES')
			else:
				print('NO')
main()


from sys import stdin
T = int(stdin.readline().strip())
for caso in range(T):
	(r, g, b, w) = map(int, stdin.readline().strip().split())
	p = 0
	i = 0
	if r % 2 == 0:
		p += 1
	if g % 2 == 0:
		p += 1
	if b % 2 == 0:
		p += 1
	p1 = 3 - p
	p2 = 1
	if w % 2 == 0:
		p += 1
		p2 = 0
	if p >= 3:
		print('Yes')
		continue
	mx = min(r, g, b)
	if mx > 0 and p1 + p2 >= 3:
		print('Yes')
		continue
	print('No')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	count = 0
	val = min(a, b, c)
	if a % 2 == 1:
		count += 1
	if b % 2 == 1:
		count += 1
	if c % 2 == 1:
		count += 1
	if d % 2 == 1:
		count += 1
	if count <= 1:
		print('Yes')
	elif val != 0:
		a -= 1
		b -= 1
		c -= 1
		d -= 1
		count = 0
		if a % 2 == 1:
			count += 1
		if b % 2 == 1:
			count += 1
		if c % 2 == 1:
			count += 1
		if d % 2 == 1:
			count += 1
		if count <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	ec = 0
	(r, g, b, w) = map(int, input().split())
	if (r == 0) | (g == 0) | (b == 0):
		if r % 2 == 0:
			ec += 1
		if g % 2 == 0:
			ec += 1
		if b % 2 == 0:
			ec += 1
		if w % 2 == 0:
			ec += 1
		if ec >= 3:
			print('Yes')
		else:
			print('No')
	elif w % 2 == 0:
		if r % 2 == 0:
			ec += 1
		if g % 2 == 0:
			ec += 1
		if b % 2 == 0:
			ec += 1
		if (ec == 3) | (ec == 0) | (ec == 2):
			print('Yes')
		else:
			print('No')
	else:
		if r % 2 == 0:
			ec += 1
		if g % 2 == 0:
			ec += 1
		if b % 2 == 0:
			ec += 1
		if (ec == 1) | (ec == 0) | (ec == 3):
			print('Yes')
		else:
			print('No')


for t in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	ans = 'No'
	for i in range(2):
		o = 0
		for c in [r, g, b, w]:
			if c % 2 == 1:
				o += 1
		if o <= 1:
			ans = 'Yes'
			break
		if r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 3
		else:
			break
	print(ans)


from math import *
from math import factorial as fact, comb as ncr
from bisect import bisect_left as bl
from bisect import bisect_right as br
from array import array
from collections import Counter as ctr
from collections import deque as dq
li = lambda : list(map(int, input().split()))
arr = lambda a: array('i', a)
bi = lambda n: bin(n).replace('0b', '')
yn = lambda f: print('NYOE S'[f::2])

def solve():
	for _ in range(int(input())):
		c = li()
		l = len([x for x in c if x % 2 == 1])
		if l in [0, 1, 4] or (l == 3 and c[0] > 0 and (c[1] > 0) and (c[2] > 0)):
			print('Yes')
		else:
			print('No')
solve()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	a = r % 2 + g % 2 + w % 2 + b % 2
	if a == 0 or a == 1 or a == 4:
		print('Yes')
	elif a == 3 and (not (r == 0 or g == 0 or b == 0)):
		print('Yes')
	elif a == 3 and (r == 0 or g == 0 or b == 0):
		print('No')
	else:
		print('No')


for _ in range(int(input())):
	l = [int(x) for x in input().split()]
	odd = 0
	even = 0
	for i in range(len(l)):
		if l[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 1 or odd == 0:
		print('YES')
	else:
		odd = 0
		even = 0
		cnt = 0
		for i in range(len(l) - 1):
			if l[i] >= 1:
				l[i] -= 1
				if l[i] % 2 == 0:
					even += 1
				else:
					odd += 1
			else:
				cnt = 1
				print('NO')
				break
		if cnt == 0:
			l[len(l) - 1] += even + odd
			if l[len(l) - 1] % 2 == 0:
				even += 1
			else:
				odd += 1
			if odd == 1 or odd == 0:
				print('YES')
			else:
				print('NO')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	co = 0
	cz = 0
	for i in range(len(l)):
		if l[i] == 0 and i < len(l) - 1:
			cz = 1
		elif l[i] % 2 != 0:
			co += 1
	print(*(['YES'], ['NO'])[co == 2 if cz == 0 else co > 1])


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r == b == g == w == 0:
		print('Yes')
		continue
	else:
		odd = [each for each in [r, g, w, b] if each % 2 != 0]
		even = [each for each in [r, g, w, b] if each % 2 == 0]
		if len(odd) >= 3:
			if r - 1 >= 0 and b - 1 >= 0 and (g - 1 >= 0):
				print('Yes')
				continue
			else:
				print('No')
				continue
		elif len(even) >= 3:
			print('Yes')
			continue
		else:
			print('NO')


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def ok():
	odd = 0
	for a in [r, g, b, w]:
		odd += a & 1
	if odd < 2:
		return True
	return False
for _ in range(II()):
	(r, g, b, w) = MI()
	if ok():
		print('Yes')
		continue
	if min(r, g, b) > 0:
		(r, g, b) = (r - 1, g - 1, b - 1)
		w += 3
		if ok():
			print('Yes')
			continue
	print('No')


n = int(input())
for i in range(n):
	r = list(map(int, input().split()))
	s = list(filter(lambda x: x % 2 == 0, r))
	t = list(filter(lambda x: x % 2 != 0, r))
	if len(s) >= 3:
		print('YES')
	elif len(t) >= 3 and (0 not in r or r[-1] == 0):
		print('YES')
	else:
		print('NO')


t = int(input())
for o in range(t):
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	flag = 0
	for i in range(3):
		if a[i] % 2 == 0:
			even += 1
		else:
			odd += 1
		if a[i] == 0:
			flag = 1
	if odd == 1 and a[3] % 2 == 0:
		print('Yes')
	elif odd == 2 and a[3] % 2 != 0 and (flag == 0):
		print('Yes')
	elif odd == 3:
		print('Yes')
	elif odd == 0:
		print('Yes')
	else:
		print('No')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
from collections import deque
for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	z = {0: 0, 1: 0}
	z[a % 2] += 1
	z[b % 2] += 1
	z[c % 2] += 1
	z[d % 2] += 1
	while z[1] > 1:
		if a > 0 and b > 0 and (c > 0):
			a -= 1
			b -= 1
			c -= 1
			d += 3
		else:
			break
		z = {0: 0, 1: 0}
		z[a % 2] += 1
		z[b % 2] += 1
		z[c % 2] += 1
		z[d % 2] += 1
		break
	if z[1] > 1:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	f = 0
	odd = 0
	if r & 1:
		odd += 1
	if g & 1:
		odd += 1
	if b & 1:
		odd += 1
	if w & 1:
		odd += 1
	if odd <= 1:
		f = 1
	p = min(r, g, b)
	p = min(p, 1)
	r -= p
	g -= p
	b -= p
	w += 3 * p
	odd = 0
	if r & 1:
		odd += 1
	if g & 1:
		odd += 1
	if b & 1:
		odd += 1
	if w & 1:
		odd += 1
	if odd <= 1:
		f = 1
	if f == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = list(map(int, input().rstrip().split()))
	mn = min(r, g, b)
	ans = []
	if g % 2 == 1:
		ans.append('g')
	if b % 2 == 1:
		ans.append('b')
	if r % 2 == 1:
		ans.append('r')
	ck = False
	if r == 0 or g == 0 or b == 0:
		ck = True
	if len(ans) != 0:
		ocheck = len(ans) + w % 2
		if ocheck == 1 or ocheck == 0:
			print('Yes')
			continue
		elif (ocheck == 3 or ocheck == 4) and (not ck):
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')
		continue


t = int(input())
for case in range(t):

	def helper(r, g, b, w):
		tot = 0
		if r & 1:
			tot += 1
		if g & 1:
			tot += 1
		if b & 1:
			tot += 1
		if w & 1:
			tot += 1
		return tot <= 1
	(r, g, b, w) = map(int, input().split())
	if helper(r, g, b, w):
		print('Yes')
	elif r != 0 and g != 0 and (b != 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if helper(r, g, b, w):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def func(arr):
	count_0 = arr[:3].count(0)
	if count_0 == 4:
		print('Yes')
		return
	elif count_0 > 0:
		odd = 0
		for i in range(4):
			if arr[i] % 2 != 0:
				odd += 1
		if odd > 1:
			print('No')
			return
		else:
			print('Yes')
			return
	odd = 0
	for i in range(3):
		if arr[i] % 2 != 0:
			odd += 1
	if arr[-1] % 2 != 0:
		if odd == 3 or odd == 2 or odd == 0:
			print('Yes')
			return
		elif odd == 1:
			print('No')
			return
	elif odd == 3 or odd == 0 or odd == 1:
		print('Yes')
		return
	else:
		print('No')
t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	func(arr)


import collections
for _ in range(int(input())):
	a = [int(x) for x in input().split()]
	(r, g, b, w) = a
	if len([x for x in a if x % 2 == 1]) <= 1:
		print('YES')
	elif 0 in a[:3]:
		print('NO')
	else:
		for i in range(3):
			a[i] -= 1
		a[3] += 3
		if len([x for x in a if x % 2 == 1]) <= 1:
			print('YES')
		else:
			print('NO')


def check(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 > 1:
		return False
	return True

def sol(r, g, b, w):
	if check(r, g, b, w):
		return 'Yes'
	elif r > 0 and g > 0 and (b > 0) and check(r - 1, g - 1, b - 1, w + 3):
		return 'Yes'
	return 'No'
k = int(input())
for i in range(k):
	(r, g, b, w) = list(map(int, input().split(' ')))
	print(sol(r, g, b, w))


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque
from collections import defaultdict
MOD = 1000000007

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans

def to_zero(n, s):
	lst = s[0]
	ans = []
	for i in range(n):
		if lst == s[i]:
			continue
		elif lst == '0':
			lst = '1'
			ans.append(i)
		else:
			lst = '0'
			ans.append(i)
	if lst == '1':
		ans.append(n)
	return ans
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	nch = 0
	ch = 0
	if r % 2 == 0:
		ch += 1
	else:
		nch += 1
	if g % 2 == 0:
		ch += 1
	else:
		nch += 1
	if b % 2 == 0:
		ch += 1
	else:
		nch += 1
	if w % 2 == 0:
		ch += 1
	else:
		nch += 1
	if ch == 3 and nch == 1 or ch == 4:
		print('YES')
	elif r > 0 and g > 0 and (b > 0) and (nch >= 3):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	c = 0
	zeroc = 0
	for i in [r, g, b, w]:
		if i % 2 != 0:
			c += 1
		if i == 0:
			zeroc += 1
	if c <= 1:
		print('YES')
	elif c == 2:
		print('NO')
	elif c == 4:
		print('YES')
	elif zeroc == 1 and w != 0:
		print('NO')
	else:
		print('YES')


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))

def main():
	(r, g, b, w) = vars()
	colors = [r, g, b, w]
	odd = 0
	for color in colors:
		if color % 2 == 1:
			odd += 1
	if (r == 0 or g == 0 or b == 0) and odd > 1:
		print('No')
		return
	if colors[-1] % 2 == 1:
		odd -= 1
	if odd == 3:
		print('Yes')
	elif odd == 2 and colors[-1] % 2 == 1:
		print('Yes')
	elif odd == 0 or (odd == 1 and colors[-1] % 2 == 0):
		print('Yes')
	else:
		print('No')
t = 1
t = int(input())
for _ in range(t):
	main()


def check(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 > 1:
		return False
	return True
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if check(r, g, b, w):
		print('YES')
	elif r > 0 and g > 0 and (b > 0) and check(r - 1, g - 1, b - 1, w + 1):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	s = [int(x) for x in input().split()]
	minn = min(s[0], s[1], s[2])
	co = 0
	for j in range(4):
		if s[j] % 2 != 0:
			co = co + 1
	if minn == 0:
		if co >= 2:
			print('No')
		else:
			print('Yes')
	elif co != 2:
		print('Yes')
	else:
		print('No')


t = 1
t = int(input())
while t:
	t -= 1
	(r, g, b, w) = list(map(int, input().split()))
	odds = 0
	odds = sum([1 for ball in [r, g, b, w] if ball & 1])
	if odds in [0, 1]:
		print('Yes')
		continue
	if min([r, g, b]) > 0:
		r -= 1
		b -= 1
		g -= 1
		w += 3
		odds = sum([1 for ball in [r, g, b, w] if ball & 1])
		if odds in [0, 1]:
			print('Yes')
			continue
	print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	odd = 0
	if r % 2 != 0:
		odd += 1
	if g % 2 != 0:
		odd += 1
	if b % 2 != 0:
		odd += 1
	if w % 2 != 0:
		if odd == 0:
			print('Yes')
			continue
		if r == 0 or g == 0 or b == 0:
			print('No')
			continue
		else:
			odd = 3 - odd
		if odd > 1:
			print('No')
			continue
		else:
			print('Yes')
			continue
	else:
		if odd <= 1:
			print('Yes')
			continue
		if r == 0 or g == 0 or b == 0:
			print('No')
			continue
		else:
			odd = 3 - odd
		if odd != 0:
			print('No')
			continue
		else:
			print('Yes')
			continue


for _ in range(int(input())):
	(r, g, b, w) = [int(__) for __ in input().split()]
	even = 0
	odd = 0
	if r % 2 == 0:
		even += 1
	else:
		odd += 1
	if g % 2 == 0:
		even += 1
	else:
		odd += 1
	if b % 2 == 0:
		even += 1
	else:
		odd += 1
	if w % 2 == 0:
		even += 1
	else:
		odd += 1
	if r * g * b == 0:
		if even >= 3:
			print('Yes')
		else:
			print('No')
		continue
	if even == odd:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	even1 = 0
	even2 = 0
	arr1 = list(map(int, input().split()))
	arr2 = arr1
	if arr1[0] > 0 and arr1[1] > 0 and (arr1[2] > 0):
		arr2 = [arr1[0] - 1, arr1[1] - 1, arr1[2] - 1, arr1[3] + 3]
	for i in arr1:
		if i % 2 == 0:
			even1 += 1
	for j in arr2:
		if j % 2 == 0:
			even2 += 1
	if even1 > 2 or even2 > 2:
		print('Yes')
	else:
		print('No')


def check(col):
	odd = 0
	for i in range(4):
		if col[i] % 2 != 0:
			odd += 1
	return odd
t = int(input())
while t > 0:
	t -= 1
	col = list(map(int, input().split()))
	odd = check(col)
	if odd <= 1:
		print('Yes')
	else:
		q = True
		for i in range(3):
			if col[i] > 0:
				col[i] -= 1
			else:
				q = False
				break
		if q == False:
			print('No')
		else:
			col[3] += 3 * 1
			oddd = check(col)
			if oddd <= 1:
				print('Yes')
			else:
				print('No')


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	b = a.copy()
	for i in range(4):
		a[i] = a[i] % 2
	if 0 in b:
		if a == [0, 0, 0, 0]:
			print('Yes')
		elif a.count(1) == 1:
			print('Yes')
		elif a[-1] == 0 and a[:3] == [1, 1, 1]:
			print('Yes')
		else:
			print('No')
	elif a == [0, 0, 0, 0]:
		print('Yes')
	elif a.count(1) == 1:
		print('Yes')
	elif a == [1, 1, 1, 1]:
		print('Yes')
	elif a[-1] == 1 and a[:3].count(0) == 1:
		print('Yes')
	elif a.count(0) == 1:
		print('Yes')
	elif a[-1] == 0 and a[:3] == [1, 1, 1]:
		print('Yes')
	else:
		print('No')


import math
from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
for _ in range(I()):
	(a, b, c, d) = M()
	f = [a, b, c]
	if a % 2 and b % 2 and c % 2:
		print('Yes')
	elif a % 2 == 0 and b % 2 == 0 and (c % 2 == 0):
		print('Yes')
	else:
		e = 0
		o = 0
		for i in f:
			if i % 2 == 0 and i != 0:
				e += 1
			elif i % 2 == 1:
				o += 1
		if d % 2 == 1 and e + o == 3:
			if o == 2 and e == 1:
				print('Yes')
			else:
				print('No')
		elif d % 2 == 0 and (o == 1 and e == 0 or (o == 1 and e == 2)):
			print('Yes')
		else:
			print('No')


class Solution:

	def solve():
		l = list(map(int, input().split()))
		c1 = 0
		c2 = 0
		for e in l[:3]:
			if e % 2:
				c1 += 1
		if l[3] % 2:
			c2 += 1
		mn = min(l[:3])
		ops = 0
		if c1 + c2 <= 1 or c1 == 3:
			return 'Yes'
		mn = min(l[:3])
		for _ in range(min(mn, 5)):
			l[0] -= 1
			l[1] -= 1
			l[2] -= 1
			l[3] += 3
			c1 = 0
			c2 = 0
			for e in l[:3]:
				if e % 2:
					c1 += 1
			if l[3] % 2:
				c2 += 1
			mn = min(l[:3])
			ops = 0
			if c1 + c2 <= 1 or c1 == 3:
				return 'Yes'
		return 'No'
t = 1
t = int(input())
for _ in range(t):
	print(Solution.solve())


import sys
read = sys.stdin.readline
for _ in range(int(read())):
	(r, g, b, w) = map(int, read().split())
	odds = 0
	evens = 0
	for i in (r, g, b, w):
		if i & 1 == 1:
			odds += 1
		else:
			evens += 1
	if evens >= 3 or odds >= 3:
		if odds >= 3 and (not r == g == b) and (not min(r, g, b) > 0):
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


T = int(input())
for I in range(0, T):
	X = input().split(' ')
	Balls = []
	Balls.append(int(X[0]))
	Balls.append(int(X[1]))
	Balls.append(int(X[2]))
	Balls.append(int(X[3]))
	Even = 0
	Odd = 0
	Zero = 0
	for (H, J) in enumerate(Balls):
		if J % 2 == 0:
			Even += 1
		else:
			Odd += 1
		if J == 0 and H != 3:
			Zero += 1
	if Odd == Even:
		print('No')
	elif Odd == 3 and Zero > 0:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	color_List = [r, g, b, w]
	check = 0
	cnt = 0
	for i in range(len(color_List)):
		if color_List[i] % 2 == 0:
			check += 1
		else:
			cnt += 1
	if r * g * b == 0:
		if cnt <= 1:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if check == 4:
		print('Yes')
		continue
	elif check == 3 and cnt == 1:
		print('Yes')
		continue
	elif cnt == 4:
		print('Yes')
		continue
	elif cnt == 3 and check == 1:
		print('Yes')
		continue
	else:
		print('No')
		continue


def okay(*a):
	return sum(map(lambda x: x % 2, a)) <= 1
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if okay(r, g, b, w):
		print('Yes')
		continue
	if r * g * b != 0 and okay(r - 1, g - 1, b - 1, w + 3):
		print('Yes')
		continue
	print('No')


T = int(input())
for _ in range(T):
	lst = list(map(int, input().split()))
	mn = min(lst[:-1])
	if mn != 0:
		mn = 1
	ind = 0
	for i in lst:
		ind += i % 2
	if ind < 2:
		print('Yes')
		continue
	for i in range(3):
		lst[i] -= mn
	lst[3] += 3 * mn
	ind = 0
	for i in lst:
		ind += i % 2
	if ind > 1:
		print('No')
	else:
		print('Yes')


randid = 'iofcpm'
for _ in ' ' * int(input()):
	(r, g, b, w) = map(int, input().split())
	k = r % 2 + g % 2 + b % 2 + w % 2
	if k <= 1:
		print('Yes')
	elif r * g * b > 0 and k >= 3:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	arr = list(map(int, input().split()))
	ans = 0
	for i in arr:
		if i % 2 == 0:
			ans += 1
	if ans == 4:
		print('Yes')
	elif ans == 0:
		if arr[0] != 0 and arr[1] != 0 and (arr[2] != 0):
			print('Yes')
		else:
			print('No')
	elif ans == 2:
		print('No')
	elif ans == 3:
		print('Yes')
	elif arr[0] != 0 and arr[1] != 0 and (arr[2] != 0):
		print('Yes')
	else:
		print('No')


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	even = 0
	odd = 0
	(r, g, b, w) = [int(x) for x in inp().split()]
	a = [r, g, b, w]
	for i in a:
		if i % 2 == 1:
			odd = odd + 1
		else:
			even += 1
	if even == odd:
		print('No')
	elif even == 1 and min(a[:3]) == 0:
		print('No')
	else:
		print('Yes')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class union_find:

	def __init__(self, n):
		self.n = n
		self.rank = [0] * n
		self.parent = [int(j) for j in range(n)]

	def union(self, i, j):
		i = self.find(i)
		j = self.find(j)
		if self.rank[i] == self.rank[j]:
			self.parent[i] = j
			self.rank[j] += 1
		elif self.rank[i] > self.rank[j]:
			self.parent[j] = i
		else:
			self.parent[i] = j

	def find(self, i):
		temp = i
		if self.parent[temp] != temp:
			self.parent[temp] = self.find(self.parent[temp])
		return self.parent[temp]
from math import log2, ceil
from collections import deque, Counter as CC

def main():
	for t in range(int(input())):
		(r, g, b, w) = [int(j) for j in input().split()]
		a = r % 2 + g % 2 + b % 2 + w % 2
		if a < 2:
			print('Yes')
		elif min(r, g, b) > 0:
			if a != 2:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
main()


Nombre = int(input())
for m in range(Nombre):
	Tab = list(map(int, input().split()))
	odd = 0
	null = 0
	for n in Tab:
		if n % 2 == 1:
			odd += 1
	if odd == 1 or odd == 4 or odd == 0:
		print('Yes')
	elif odd == 3:
		for n in range(3):
			if Tab[n] == 0:
				null += 1
		if null > 0:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappush, heappop, heapify, nlargest, nsmallest
from functools import lru_cache
import os
import sys
from io import BytesIO, IOBase
import math
import bisect
from math import inf
import random
ins = lambda : [int(x) for x in input()]
inp = lambda : int(input())
inps = lambda : [int(x) for x in input().split()]
from fractions import Fraction as F
md = pow(10, 9) + 7

def main():
	t = inp()
	for _ in range(t):
		(r, g, b, w) = inps()
		cnt = 0
		if r & 1:
			cnt += 1
		if g & 1:
			cnt += 1
		if b & 1:
			cnt += 1
		if w & 1:
			cnt += 1
		if cnt > 1:
			x = min(r, g, b)
			if not x:
				print('No')
				continue
			if cnt > 2:
				print('Yes')
			else:
				print('No')
		else:
			print('Yes')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def palindrome(a, b, c, d):
	count = 0
	for i in [a, b, c, d]:
		if i % 2 == 0:
			count += 1
	if count >= 3:
		return 'YES'
	else:
		return 'NO'
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if palindrome(r, g, b, w) == 'YES':
		print('YES')
	elif min(r, g, b) == 0:
		print('NO')
	else:
		print(palindrome(r - 1, g - 1, b - 1, w + 3))


def test(r, g, b, w):
	count = 0
	a = [r, g, b, w]
	for i in a:
		if i % 2 == 0:
			count += 1
	return count >= 3
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split(' '))
	if test(r, g, b, w):
		print('Yes')
	else:
		d = min(r, g, b)
		if d >= 1 and test(r - 1, g - 1, b - 1, w + 1):
			print('Yes')
		else:
			print('No')


T = lambda : range(int(input()))
A = lambda : list(map(int, input().split()))
isodd = lambda a: a & 1
for _ in T():
	a = A()
	(r, g, b, w) = a
	if r == 0 or g == 0 or b == 0:
		x = 0
		if isodd(r):
			x = x + 1
		if isodd(g):
			x = x + 1
		if isodd(b):
			x = x + 1
		if x == 2:
			print('No')
		elif x == 1:
			if isodd(w):
				print('No')
			else:
				print('Yes')
		else:
			print('Yes')
	else:
		x = 0
		if isodd(r):
			x = x + 1
		if isodd(g):
			x = x + 1
		if isodd(b):
			x = x + 1
		if x == 3 or x == 0:
			print('Yes')
		elif x == 2:
			if isodd(w):
				print('Yes')
			else:
				print('No')
		elif isodd(w):
			print('No')
		else:
			print('Yes')


t = int(input())
for i in range(t):
	r = list(map(int, input().split()))
	o = 0
	e = 0
	if r[0] != 0 and r[1] != 0 and (r[2] != 0):
		for i in r:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if o == 2 and e == 2:
			print('NO')
		else:
			print('YES')
	else:
		for i in r:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if o == 1 or o == 0:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split(' '))
	m = min([r, g, b])
	tot = sum([r, g, b, w])
	if not tot % 2:
		if r % 2 and g % 2 and b % 2 and w % 2 or not (r % 2 or g % 2 or b % 2 or w % 2):
			print('Yes')
			continue
	else:
		odd = sum([x % 2 for x in [r, g, b, w]])
		if odd == 1 or (odd == 3 and m != 0):
			print('Yes')
			continue
	print('No')


t = int(input())

def twoEven(a, b, c):
	if a % 2 == 0 and b % 2 == 0:
		return True
	if b % 2 == 0 and c % 2 == 0:
		return True
	if a % 2 == 0 and c % 2 == 0:
		return True
	return False

def twoOdd(a, b, c):
	if a % 2 != 0 and b % 2 != 0:
		return True
	if b % 2 != 0 and c % 2 != 0:
		return True
	if a % 2 != 0 and c % 2 != 0:
		return True
	return False
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if r and g and b:
		if r % 2 != 0 and g % 2 != 0 and (b % 2 != 0):
			print('YES')
		elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
			print('YES')
		elif twoOdd(r, g, b) and w % 2 == 0:
			print('NO')
		elif twoEven(r, g, b) and w % 2 != 0:
			print('NO')
		else:
			print('YES')
	elif r == 0 and twoEven(g, b, w):
		print('YES')
	elif g == 0 and twoEven(r, b, w):
		print('YES')
	elif b == 0 and twoEven(r, g, w):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	(r, g, b, w) = map(int, input().split())
	if r % 2 + b % 2 + g % 2 + w % 2 <= 1:
		print('YES')
	elif r == 0 or g == 0 or b == 0:
		print('NO')
	else:
		r -= 1
		b -= 1
		g -= 1
		w += 3
		if r % 2 + b % 2 + g % 2 + w % 2 <= 1:
			print('YES')
		else:
			print('NO')
	t -= 1


def can_make_palindrome(r, g, b, w):
	balls_n = r + g + b + w
	if balls_n % 2 == 0:
		result = r % 2 == g % 2 == b % 2 == w % 2
	else:
		result = (can_make_palindrome(r - 1, g, b, w) if r > 0 else False) or (can_make_palindrome(r, g - 1, b, w) if g > 0 else False) or (can_make_palindrome(r, g, b - 1, w) if b > 0 else False) or (can_make_palindrome(r, g, b, w - 1) if w > 0 else False) or (can_make_palindrome(r - 1, g - 1, b - 1, w + 2) if r > 0 and g > 0 and (b > 0) else False)
	return result

def main():
	t = int(input())
	for i in range(t):
		(r, g, b, w) = map(int, input().split())
		output = 'Yes' if can_make_palindrome(r, g, b, w) else 'No'
		print(output)
main()


for _ in [0] * int(input()):
	arr = [int(a) for a in input().split()]
	(o, e) = (0, 0)
	for b in arr:
		if b % 2 == 0:
			e += 1
		else:
			o += 1
	if e == 2:
		print('No')
	elif e == 1 or e == 0:
		if arr[0] == 0 or arr[1] == 0 or arr[2] == 0:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


def check(a, b, c, w):
	if a % 2 + b % 2 + c % 2 + w % 2 <= 1:
		return True
	else:
		return False
t = int(input())
for _ in range(t):
	(a, b, c, w) = list(map(int, input().split()))
	if check(a, b, c, w):
		print('Yes')
	elif a > 0 and b > 0 and (c > 0) and check(a - 1, b - 1, c - 1, w + 1):
		print('Yes')
	else:
		print('No')


import sys
from collections import defaultdict

def chk(r, g, b, w):
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		print('Yes')
		return 1
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 1):
		print('Yes')
		return 1
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0):
		print('Yes')
		return 1
	if r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0):
		print('Yes')
		return 1
	if r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		print('Yes')
		return 1
	return 0
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if chk(r, g, b, w) == 1:
		continue
	if r == 0 or g == 0 or b == 0:
		print('No')
		continue
	r -= 1
	g -= 1
	b -= 1
	w += 3
	if chk(r, g, b, w) == 1:
		continue
	if r == 0 or g == 0 or b == 0:
		print('No')
		continue
	r -= 1
	g -= 1
	b -= 1
	w += 3
	if chk(r, g, b, w) == 1:
		continue
	print('No')


n = int(input(''))
for i in range(n):
	(r, g, b, w) = map(int, input().split())
	num = r % 2 + g % 2 + b % 2 + w % 2
	less = min(r, min(g, b))
	if less == 0:
		if num > 1:
			print('No')
		else:
			print('Yes')
	elif num == 2:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	l = [int(x) for x in input().split()]
	odd = 0
	for i in l:
		if i % 2 != 0:
			odd += 1
	if odd <= 1:
		print('Yes')
	elif odd == 3 or odd == 4:
		if min(l[:3]) >= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def color(balls):
	r = balls[0]
	b = balls[1]
	g = balls[2]
	w = balls[3]
	count = 0
	for i in balls:
		if i % 2 == 0:
			count += 1
	if count >= 3 or count == 0:
		return 'YES'
	elif count == 1:
		if w % 2 == 0:
			return 'YES'
		elif r * g * b != 0:
			return 'YES'
		else:
			return 'NO'
	else:
		return 'NO'
n = int(input())
ans = []
for i in range(n):
	a = list(map(int, input().split()))
	ans.append(color(a))
for j in ans:
	print(j)


from sys import stdin, stdout, setrecursionlimit
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
setrecursionlimit(100000)
mod = 1000000007

def get(a, b, c, d):
	count = 0
	if a % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	if c % 2 != 0:
		count += 1
	if d % 2 != 0:
		count += 1
	return count
tc = ii1()
for _ in range(tc):
	(r, g, b, w) = iia()
	if get(r, g, b, w) <= 1:
		print('Yes')
	else:
		arr = [1, 2, 3, min(r, g, b)]
		for i in arr:
			if i <= min(r, g, b):
				if get(r - i, g - i, b - i, w + 3 * i) <= 1:
					print('Yes')
					break
		else:
			print('No')


n = int(input())
res = []
for i in range(n):
	(a, b, c, d) = [int(i) for i in input().split()]
	ch = 0
	nch = 0
	if a % 2 == 0:
		ch += 1
	else:
		nch += 1
	if b % 2 == 0:
		ch += 1
	else:
		nch += 1
	if c % 2 == 0:
		ch += 1
	else:
		nch += 1
	if d % 2 == 0:
		ch += 1
	else:
		nch += 1
	if a == 0 or b == 0 or c == 0:
		if nch == 1 or nch == 0:
			res.append('Yes')
		else:
			res.append('No')
	elif nch == 1 or ch == 1:
		res.append('Yes')
	elif ch == 0 or nch == 0:
		res.append('Yes')
	else:
		res.append('No')
for i in res:
	print(i)


t = int(input())
z = 0
while z < t:
	rgbw = list(map(int, input().split()))
	a = []
	index = 0
	K2 = 0
	NK2 = 0
	valid = True
	if 0 in rgbw[:3]:
		for i in rgbw:
			if i == 0:
				continue
			if i % 2 == 0:
				K2 += 1
			else:
				NK2 += 1
		if K2 == 3 or (K2 == 2 and NK2 == 1) or (K2 == 2 and NK2 == 0) or (K2 == 1 and NK2 == 0) or (K2 == 0 and NK2 == 1) or (K2 == 0 and NK2 == 0) or (K2 == 1 and NK2 == 1):
			print('Yes')
			valid = False
		else:
			valid = True
	else:
		for i in rgbw:
			if i % 2 == 0:
				K2 += 1
			else:
				NK2 += 1
		if K2 == 4 or (K2 == 3 and NK2 == 1):
			print('Yes')
			valid = False
		else:
			valid = True
	index = 0
	while index < 4 and valid:
		if 0 in rgbw[:3]:
			break
		if index == 3:
			a.append(rgbw[index] + 3)
		else:
			a.append(rgbw[index] - 1)
		index += 1
	k2 = 0
	nk2 = 0
	if len(a) == 0 and valid:
		for i in rgbw:
			if i == 0:
				continue
			elif i % 2 == 0:
				k2 += 1
			else:
				nk2 += 1
		if k2 == 3 or (k2 == 2 and nk2 == 1) or (k2 == 2 and nk2 == 0) or (k2 == 1 and nk2 == 0) or (k2 == 0 and nk2 == 1) or (k2 == 0 and nk2 == 0):
			print('Yes')
		else:
			print('No')
	elif valid:
		for i in a:
			if i % 2 == 0:
				k2 += 1
			else:
				nk2 += 1
		if k2 == 4 or (k2 == 3 and nk2 == 1):
			print('Yes')
		else:
			print('No')
	z += 1


def noodd(a, b, c, d):
	s = 0
	if a % 2 == 1:
		s += 1
	if b % 2 == 1:
		s += 1
	if c % 2 == 1:
		s += 1
	if d % 2 == 1:
		s += 1
	return s
t = int(input())
while t != 0:
	(r, g, b, w) = map(int, input().split())
	f = 0
	for i in range(3):
		if noodd(r, g, b, w) <= 1:
			print('Yes')
			f = 2
			break
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if r < 0 or g < 0 or b < 0:
			f = 1
			break
	if f != 2:
		print('No')
	t -= 1


t = int(input())
for i in range(t):
	balls = [int(s) for s in input().split()]
	if balls[0] == balls[1] and balls[1] == balls[2] or (balls[0] % 2 == balls[1] % 2 and balls[1] % 2 == balls[2] % 2):
		print('Yes')
	elif balls[3] % 2 == 1:
		if balls[0] % 2 == 0 and balls[1] % 2 == 1 and (balls[2] % 2 == 1) and (balls[0] > 0):
			print('Yes')
		elif balls[0] % 2 == 1 and balls[1] % 2 == 0 and (balls[2] % 2 == 1) and (balls[1] > 0):
			print('Yes')
		elif balls[0] % 2 == 1 and balls[1] % 2 == 1 and (balls[2] % 2 == 0) and (balls[2] > 0):
			print('Yes')
		else:
			print('No')
	elif balls[0] % 2 == 1 and balls[1] % 2 == 0 and (balls[2] % 2 == 0):
		print('Yes')
	elif balls[0] % 2 == 0 and balls[1] % 2 == 1 and (balls[2] % 2 == 0):
		print('Yes')
	elif balls[0] % 2 == 0 and balls[1] % 2 == 0 and (balls[2] % 2 == 1):
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	t -= 1
	ls = list(map(int, input().split()))
	odd = 0
	for item in ls:
		if item % 2 != 0:
			odd += 1
	if odd == 0 or odd == 1:
		print('Yes')
	elif ls[0] > 0 and ls[1] > 0 and (ls[2] > 0):
		if odd == 3 or odd == 4:
			print('Yes')
		else:
			print('NO')
	else:
		print('No')


t = int(input())
for i in range(t):
	a = list(map(int, input().strip().split(' ')))
	c = 0
	for i in a:
		if i % 2:
			c += 1
	if not (a[0] and a[1] and a[2]) and c > 1:
		print('NO')
	elif c != 2:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	a = list(map(int, input().split()))
	c = 0
	for j in a:
		if j % 2 == 0:
			c += 1
	if c == 4 or c == 3:
		print('Yes')
	elif (c == 1 or c == 0) and a[0] != 0 and (a[1] != 0) and (a[2] != 0):
		print('Yes')
	else:
		print('No')


t = int(input())
for case in range(t):
	balls = [int(s) for s in input().split(' ')]
	rems = [x % 2 for x in balls]
	if sum(rems) == 2:
		answer = 'No'
	elif sum(rems) == 3 and 0 in balls[:-1]:
		answer = 'No'
	else:
		answer = 'Yes'
	print(answer)


for _ in range(int(input())):
	arr = list(map(int, input().split()))
	(f, flag) = (0, -1)
	for i in range(4):
		if arr[i] % 2 != 0:
			f += 1
	if f == 0 or f == 1:
		print('YES')
	elif f == 2:
		print('NO')
	elif 0 in arr[:3]:
		print('NO')
	else:
		print('YES')


from sys import stdin
G = lambda : stdin.readline().strip()
gl = lambda : G().split()
gil = lambda : [int(var) for var in gl()]
(t,) = gil()
for _ in range(t):
	(r, g, b, w) = gil()
	if r == 0 or b == 0 or g == 0:
		o = 0
		for val in [r, g, b, w]:
			if val & 1:
				o += 1
		if o <= 1:
			print('Yes')
		else:
			print('No')
	else:
		o = 0
		for val in [r, g, b, w]:
			if val & 1:
				o += 1
		if o != 2:
			print('Yes')
		else:
			print('No')


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
import os
from io import BytesIO, IOBase
import sys

def main():
	for _ in range(int(input())):
		(a, b, c, d) = map(int, input().split())
		ok = a % 2 + b % 2 + c % 2 + d % 2
		if min(a, b, c) == 0 and ok >= 2:
			print('NO')
		elif ok == 2:
			print('NO')
		else:
			print('YES')
main()


def is_odd(n):
	return n % 2 == 1
for _ in range(int(input())):
	(a, b, c, d) = list(map(int, input().split()))
	odd_num = 0
	even = 0
	for i in [a, b, c]:
		if is_odd(i):
			odd_num += 1
		else:
			even += 1
	if even == 3:
		print('Yes')
	elif even == 2 and is_odd(d):
		print('No')
	elif even == 2 and (not is_odd(d)):
		print('Yes')
	elif even == 1 and is_odd(d):
		if min([a, b, c]) == 0:
			print('No')
		else:
			print('Yes')
	elif even == 1 and (not is_odd(d)):
		print('No')
	elif even == 0:
		print('Yes')


for _ in ' ' * int(input()):
	(r, g, b, w) = map(int, input().split())
	x = min(r, g, b)
	f = 0
	if x == 0:
		if r % 2:
			f += 1
		if g % 2:
			f += 1
		if b % 2:
			f += 1
		if w % 2:
			f += 1
		if f <= 1:
			print('Yes')
		else:
			print('No')
	else:
		if r % 2:
			f += 1
		if g % 2:
			f += 1
		if b % 2:
			f += 1
		if w % 2:
			f += 1
		if f <= 1:
			print('Yes')
		else:
			f = 0
			r -= 1
			b -= 1
			g -= 1
			w += 3
			f = 0
			if r % 2:
				f += 1
			if g % 2:
				f += 1
			if b % 2:
				f += 1
			if w % 2:
				f += 1
			if f <= 1:
				print('Yes')
			else:
				print('No')


import os
from io import BytesIO, IOBase
import sys

def main():
	for _ in range(int(input())):
		(a, b, c, d) = map(int, input().split())
		(A, B, C, D) = (a & 1, b & 1, c & 1, d & 1)
		if min(a, b, c) == 0:
			print('Yes' if A + B + C + D <= 1 else 'No')
			continue
		if A + B + C + D <= 1:
			print('Yes')
			continue
		flag = False
		for i in range(min(10, a, b, c)):
			a -= 1
			b -= 1
			c -= 1
			d += 1
			(A, B, C, D) = (a & 1, b & 1, c & 1, d & 1)
			if A + B + C + D <= 1:
				flag = True
		print('Yes' if flag else 'No')
	return
BUFSIZE = 1048576

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a % 2 + b % 2 + c % 2 + d % 2 == 1 or a % 2 + b % 2 + c % 2 + d % 2 == 0:
		print('YES')
		continue
	if a != 0 and b != 0 and (c != 0):
		a -= 1
		b -= 1
		c -= 1
		d += 1
	if a % 2 + b % 2 + c % 2 + d % 2 == 1 or a % 2 + b % 2 + c % 2 + d % 2 == 0:
		print('YES')
	else:
		print('NO')


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write('\n'.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from decimal import Decimal
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	(r, g, b, w) = mdata()
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) or (r % 2 != 0 and g % 2 != 0 and (b % 2 != 0)):
		out('YES')
	elif w % 2 == 0 and (r + g + b) % 2 != 0:
		out('YES')
	elif w % 2 == 1 and (r + g + b) % 2 == 0 and (r != 0) and (g != 0) and (b != 0):
		out('YES')
	else:
		out('NO')


import math
import sys
import bisect
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	l = []
	l.append(r)
	l.append(g)
	l.append(b)
	l.sort()
	l1 = []
	l.append(w)
	for i in l:
		l1.append(i)
	w1 = w
	if l[0] > 0:
		for i in range(3):
			l1[i] -= 1
		l1[-1] += 3
	if sum(l[:]) % 2 == 0:
		(ch1, ch2) = (1, 1)
		for i in l:
			if i % 2 != 0:
				ch1 = 0
		for i in l1:
			if i % 2 != 0:
				ch2 = 0
		if ch1 or ch2:
			print('Yes')
		else:
			print('No')
	else:
		(ch1, ch2) = (0, 0)
		for i in l:
			if i % 2 != 0:
				ch1 += 1
		for i in l1:
			if i % 2 != 0:
				ch2 += 1
		if ch1 == 1 or ch2 == 1:
			print('Yes')
		else:
			print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = [int(x) for x in input().split()]
	oddCnts = 0
	if r % 2 == 1:
		oddCnts += 1
	if g % 2 == 1:
		oddCnts += 1
	if b % 2 == 1:
		oddCnts += 1
	ans = 'Yes'
	if oddCnts == 1 and w % 2 == 1:
		ans = 'No'
	elif oddCnts == 2 and w % 2 == 0:
		ans = 'No'
	elif oddCnts == 2 and w % 2 == 1 and (r == 0 or g == 0 or b == 0):
		ans = 'No'
	print(ans)


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def isValid(a):
	c = 0
	for i in a:
		if i % 2 != 0:
			c += 1
	if c > 1:
		return False
	return True

def main():
	t = inp()
	for _ in range(t):
		(r, g, b, w) = invr()
		maxOp = min(r, g, b, 2)
		f = False
		for i in range(maxOp):
			r -= 1
			g -= 1
			b -= 1
			w += 3
			if isValid([r, g, b, w]):
				f = True
				break
		f = isValid([r, g, b, w])
		if f:
			print('Yes')
		else:
			print('No')
main()


for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	(k1, k2, k3, k4) = (r % 2, g % 2, b % 2, w % 2)
	s = k1 + k2 + k3 + k4
	if s == 2:
		print('NO')
	elif s == 0 or s == 1:
		print('YES')
	elif min(r, g, b) > 0:
		print('YES')
	else:
		print('NO')


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	mod2RGB = r % 2 + g % 2 + b % 2
	if r == 0 or g == 0 or b == 0:
		if w % 2 == 1 and mod2RGB > 0:
			print('No')
		elif w % 2 == 0 and mod2RGB > 1:
			print('No')
		else:
			print('Yes')
	elif mod2RGB == 0:
		print('Yes')
	elif mod2RGB == 3:
		print('Yes')
	elif mod2RGB == 2 and w % 2 == 1:
		print('Yes')
	elif mod2RGB == 1 and w % 2 == 0:
		print('Yes')
	else:
		print('No')


for ii in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	mod = [r % 2, g % 2, b % 2, w % 2]
	if mod.count(0) >= 3 or mod.count(1) == 4:
		print('YES')
	elif r == 0 or g == 0 or b == 0:
		print('NO')
	else:
		for jj in range(4):
			if mod[jj] == 0:
				mod[jj] = 1
			else:
				mod[jj] = 0
		if mod.count(0) >= 3 or mod.count(1) == 4:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	rgb = list(map(int, input().split()))
	a = sum([1 for i in rgb if i % 2 == 0])
	if a == 2:
		print('NO')
	elif a == 1 and (rgb[0] == 0 or rgb[1] == 0 or rgb[2] == 0):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if (a + b + c + d) % 2 == 0:
		if a % 2 == b % 2 == c % 2 == d % 2:
			print('Yes')
		else:
			print('No')
	else:
		count = 0
		if a % 2:
			count += 1
		if b % 2:
			count += 1
		if c % 2:
			count += 1
		if count == 2 and (a == 0 or b == 0 or c == 0):
			print('No')
		else:
			print('Yes')


t = int(input())
for i in range(t):
	balls = list(map(int, input().split()))
	ans = False
	odds = 0
	for i in range(4):
		if balls[i] % 2 != 0:
			odds += 1
	if odds <= 1:
		ans = True
	if balls[0] > 0 and balls[1] > 0 and (balls[2] > 0) and (odds >= 3):
		ans = True
	if ans:
		print('Yes')
	else:
		print('No')


import sys
T = int(input())

def check(lijstje):
	uneven = 0
	for i in lijstje:
		if i % 2 == 1:
			uneven += 1
	if uneven <= 1 or (uneven >= 3 and min(lijstje[:-1]) != 0):
		print('Yes')
	else:
		print('No')
for line in sys.stdin:
	(r, g, b, w) = (int(x) for x in line.split())
	check([r, g, b, w])


t = int(input())
for hh in range(0, t):
	(r, g, b, w) = [int(x) for x in input().split()]
	rem = 0
	flag = 0
	ro = r
	go = g
	bo = b
	wo = w
	if r % 2 == 1:
		rem += 1
	if g % 2 == 1:
		rem += 1
	if b % 2 == 1:
		rem += 1
	if w % 2 == 1:
		rem += 1
	if rem <= 1:
		print('Yes')
		flag = 1
	else:
		mn = min(r, g, b)
		r -= mn
		g -= mn
		b -= mn
		w += 3 * mn
		cnt = 0
		if r % 2 == 1:
			cnt += 1
		if g % 2 == 1:
			cnt += 1
		if b % 2 == 1:
			cnt += 1
		if cnt == 0:
			print('Yes')
			flag = 1
		elif w % 2 == 0 and cnt == 1:
			print('Yes')
			flag = 1
	if flag == 0:
		r = ro
		b = bo
		g = go
		w = wo
		rem = 0
		mn = min(r, g, b)
		if mn > 0:
			r -= 1
			w += 3
			b -= 1
			g -= 1
		if r % 2 == 1:
			rem += 1
		if g % 2 == 1:
			rem += 1
		if b % 2 == 1:
			rem += 1
		if w % 2 == 1:
			rem += 1
		if rem <= 1:
			print('Yes')
			flag = 1
		else:
			mn = min(r, g, b)
			r -= mn
			g -= mn
			b -= mn
			w += 3 * mn
			cnt = 0
			if r % 2 == 1:
				cnt += 1
			if g % 2 == 1:
				cnt += 1
			if b % 2 == 1:
				cnt += 1
			if cnt == 0:
				print('Yes')
				flag = 1
			elif w % 2 == 0 and cnt == 1:
				print('Yes')
				flag = 1
			else:
				print('No')


for u in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	o = 0
	e = 0
	if r & 1:
		o += 1
	else:
		e += 1
	if g & 1:
		o += 1
	else:
		e += 1
	if b & 1:
		o += 1
	else:
		e += 1
	if w & 1:
		o += 1
	else:
		e += 1
	if o == 1 or o == 0:
		print('Yes')
	elif r >= 1 and g >= 1 and (b >= 1) and (o >= 3):
		print('Yes')
	else:
		print('No')


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
import math
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():

	def solve():
		(r, g, b, w) = map(int, input().split())
		m = min(r, g, b)
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			return 'YES'
		if r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 3
			if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
				return 'YES'
		return 'NO'
	t = int(input())
	for i in range(t):
		print(solve())
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	e = 0
	o = 0
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e >= 3:
		print('Yes')
	elif l[:3].count(0) > 0:
		print('No')
	else:
		for i in l[:3]:
			if i % 2 == 0:
				e -= 1
				o += 1
			else:
				o -= 1
				e += 1
		if l[3] % 2 == 0:
			e -= 1
			o += 1
		else:
			e += 1
			o -= 1
		if e >= 3:
			print('Yes')
		else:
			print('No')


def num_odd(r, g, b, w):
	c = 0
	if r % 2 == 1:
		c += 1
	if g % 2 == 1:
		c += 1
	if b % 2 == 1:
		c += 1
	if w % 2 == 1:
		c += 1
	return c
t = int(input())
while t:
	[r, g, b, w] = [int(x) for x in input().split()]
	ccp = r > 0 and g > 0 and (b > 0)
	if num_odd(r, g, b, w) > 1:
		if ccp:
			r -= 1
			g -= 1
			b -= 1
			w += 3
		if num_odd(r, g, b, w) > 1:
			print('No')
		else:
			print('YES')
	else:
		print('YES')
	t -= 1


def checarpalindromo(lista_pelotas):
	count = 0
	for i in lista_pelotas:
		if i % 2:
			count += 1
	if count == 4 or count == 0 or count == 1:
		return 'Yes'
	elif count == 3:
		x = lista_pelotas[0:3]
		if 0 in x:
			return 'No'
		else:
			return 'Yes'
	else:
		return 'No'
test = int(input())
for i in range(test):
	lista_pelotas = list(map(int, input().split()))
	print(checarpalindromo(lista_pelotas))


def solve():
	(r, g, b, w) = map(int, input().split())
	k = 0
	for x in [r, g, b, w]:
		k += x % 2
	if k == 0 or k == 1:
		print('YES')
		return
	if r > 0 and g > 0 and (b > 0):
		k = 0
		for x in [r - 1, g - 1, b - 1, w + 3]:
			k += x % 2
		if k == 0 or k == 1:
			print('YES')
			return
		x = min(r, g, b)
		r -= x
		g -= x
		b -= x
		w += x * 3
		k = 0
		for x in [r, g, b, w]:
			k += x % 2
		if k == 0 or k == 1:
			print('YES')
			return
	print('NO')
for t in range(int(input())):
	solve()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	l = [r, g, b, w]
	f = 0
	x = 0
	y = 0
	for i in range(4):
		if i < 3:
			if l[i] == 0:
				f = 1
		if l[i] % 2 == 0:
			x += 1
		else:
			y += 1
	if x == y:
		print('No')
	elif x == 0 or y == 0:
		print('Yes')
	elif x > y:
		print('Yes')
	elif l[-1] % 2 == 0:
		print('Yes')
	elif f == 1:
		print('No')
	else:
		print('Yes')


exec(int(input()) * "a = [*map(int, input().split())];y = [*map(lambda x:x%2,a)];print('YNeos'[(y.count(1)>1) if 0 in a[:3] else (sum(y)==2) ::2]);")


t = int(input())
for _ in range(t):
	(a, b, c, d) = map(int, input().split())
	odd = 0
	aa = [a, b, c, d]
	for i in aa:
		odd += i % 2
	if odd <= 1:
		print('Yes')
	else:
		ab = 0
		if a and b and c:
			ab = 1
		a -= ab
		b -= ab
		c -= ab
		if ab:
			d += 3
		odd = 0
		for i in [a, b, c, d]:
			odd += i % 2
		print('Yes' if odd <= 1 else 'No')


def nextInt():
	return int(input())

def intArr():
	arr = input().split(' ')
	ans = []
	for x in arr:
		ans.append(int(x))
	return ans

def p(r, g, b, w):
	odd = 0
	if r % 2 != 0:
		odd += 1
	if g % 2 != 0:
		odd += 1
	if b % 2 != 0:
		odd += 1
	if w % 2 != 0:
		odd += 1
	if odd == 1 or odd == 0:
		return True
	else:
		return False

def tof(r, g, b, w):
	odd = 0
	if r % 2 != 0:
		odd += 1
	if g % 2 != 0:
		odd += 1
	if b % 2 != 0:
		odd += 1
	if w % 2 != 0:
		odd += 1
	if odd == 3 or odd == 4:
		return True
	else:
		return False
t = nextInt()
ans = []
for tt in range(t):
	s = input().split(' ')
	r = int(s[0])
	g = int(s[1])
	b = int(s[2])
	w = int(s[3])
	if p(r, g, b, w):
		ans.append('Yes')
	elif r == 0 or g == 0 or b == 0:
		ans.append('No')
	elif tof(r, g, b, w):
		ans.append('Yes')
	else:
		ans.append('No')
for x in ans:
	print(x)


TC = int(input())
for tc in range(TC):
	(r, g, b, w) = map(int, input().split())
	small = min(r, g, b)
	fr = r - small
	fg = g - small
	fb = b - small
	fw = w + 3 * small
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
		print('YES')
	elif r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		print('YES')
	elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0):
		print('YES')
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0):
		print('YES')
	elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 1) and (r > 0):
		print('YES')
	elif r % 2 == 1 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 1) and (g > 0):
		print('YES')
	elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 1) and (b > 0):
		print('YES')
	elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 1) and (b > 0) and (r > 0) and (g > 0):
		print('YES')
	elif fr % 2 == 0 and fg % 2 == 0 and (fb % 2 == 0) and (fw % 2 == 0):
		print('YES')
	elif fr % 2 == 1 and fg % 2 == 0 and (fb % 2 == 0) and (fw % 2 == 0):
		print('YES')
	elif fr % 2 == 0 and fg % 2 == 1 and (fb % 2 == 0) and (fw % 2 == 0):
		print('YES')
	elif fr % 2 == 0 and fg % 2 == 0 and (fb % 2 == 1) and (fw % 2 == 0):
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	p = input()
	s = p.split()
	r = int(s[0])
	g = int(s[1])
	b = int(s[2])
	w = int(s[3])
	o = 0
	e = 0
	if r % 2 == 0:
		e += 1
	else:
		o += 1
	if g % 2 == 0:
		e += 1
	else:
		o += 1
	if b % 2 == 0:
		e += 1
	else:
		o += 1
	if w % 2 == 0:
		e += 1
	else:
		o += 1
	if o <= 1:
		print('Yes')
	elif r == 0 or g == 0 or b == 0:
		print('No')
	elif e <= 1:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())

def check(r, g, b, w):
	if r >= 0 and g >= 0 and (b >= 0) and (w >= 0):
		c = 0
		if r % 2 != 0:
			c += 1
		if g % 2 != 0:
			c += 1
		if b % 2 != 0:
			c += 1
		if w % 2 != 0:
			c += 1
		if c == 0 or c == 1:
			return True
	return False
for t1 in range(t):
	(r, g, b, w) = list(map(int, input().split(' ')))
	if check(r, g, b, w) or check(r - 1, g - 1, b - 1, w + 1):
		print('Yes')
	else:
		print('No')


import sys
input = lambda : sys.stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	(r, g, b, w) = mp()
	codd = 0
	if r % 2 == 1:
		codd += 1
	if g % 2 == 1:
		codd += 1
	if b % 2 == 1:
		codd += 1
	if w % 2 == 1:
		codd += 1
	if codd == 1:
		print('Yes')
	elif codd == 2:
		print('No')
	elif codd == 3:
		if r != 0 and g != 0 and (b != 0):
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	flagy = False
	lstt = [1, 2, 3, 4, 5]
	cList = [r, g, b, w]
	jjak = 0
	hol = 0
	fuxx = 0
	muxx = 1
	intmaxx = 1000000000001
	for i in range(len(cList)):
		if cList[i] % 2 == 0:
			jjak += 1
			flagy = True
		else:
			hol += 1
	if r * g * b == 0:
		if hol <= 1:
			print('Yes')
			continue
		else:
			print('No')
			flagy = False
			continue
	if jjak == 4:
		print('Yes')
		flagy = True
		continue
	elif jjak == 3 and hol == 1:
		print('Yes')
		continue
	elif hol == 4:
		print('Yes')
		continue
	elif hol == 3 and jjak == 1:
		print('Yes')
		continue
	else:
		print('No')
		flagy = False
		continue


n = int(input())
for i in range(n):
	(r, g, b, w) = map(int, input().split())
	f = 0
	if r * g * b == 0:
		f = 1
	r = r % 4
	g = g % 4
	b = b % 4
	w = w % 4
	if (r * r + g * g + b * b + w * w - 2) % 4 == 0 or (f == 1 and (r * r + g * g + b * b + w * w) % 4 >= 2):
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	c = r % 2 + g % 2 + b % 2 + w % 2
	m = min(min(r, g), b)
	l = 'No'
	if c < 2:
		l = 'Yes'
	for i in range(min(m, 10)):
		r -= 1
		g -= 1
		b -= 1
		w += 1
		c = r % 2 + g % 2 + b % 2 + w % 2
		if c < 2:
			l = 'Yes'
	print(l)


n = int(input())
for i in range(n):
	ans = False
	(r, b, g, w) = map(int, input().split())
	if (r + b + g + w) % 2 == 0:
		if r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 0):
			ans = True
	else:
		count = 0
		if r % 2 == 1:
			count += 1
		if b % 2 == 1:
			count += 1
		if g % 2 == 1:
			count += 1
		if w % 2 == 1:
			count += 1
		if count < 2:
			ans = True
	if ans == False and r > 0 and (b > 0) and (g > 0):
		mi = 1
		r = r - mi
		b = b - mi
		g = g - mi
		w = w + mi + mi + mi
		if (r + b + g + w) % 2 == 0:
			if r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 0):
				ans = True
		else:
			count = 0
			if r % 2 == 1:
				count += 1
			if b % 2 == 1:
				count += 1
			if g % 2 == 1:
				count += 1
			if w % 2 == 1:
				count += 1
			if count < 2:
				ans = True
	if ans:
		print('Yes')
	else:
		print('No')


t = int(input())
for j in range(t):
	(r, g, b, w) = [int(k) for k in input().split()]
	if (r + g + b + w) % 2 == 0:
		if r % 2 == g % 2 == b % 2 == w % 2:
			print('Yes')
		else:
			print('No')
	elif r % 2 + g % 2 + b % 2 + w % 2 == 1:
		print('Yes')
	elif r % 2 + g % 2 + b % 2 + w % 2 == 3 and 0 not in [r, g, b]:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	t = [i for i in arr if i % 2 == 0]
	if len(t) == 1 and (arr[0] == 0 or arr[1] == 0 or arr[2] == 0):
		print('No')
	elif len(t) == 2:
		print('No')
	else:
		print('Yes')


def pali(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 > 1:
		return False
	else:
		return True
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	if pali(r, g, b, w):
		print('YES')
	elif r > 0 and b > 0 and (g > 0) and pali(r - 1, g - 1, b - 1, w - 1):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	n = r + g + b + w
	if n % 2 == 0:
		if r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 0):
			ans = 1
		elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0):
			ans = 1
		else:
			ans = 0
	elif r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 != 0):
		ans = 1
	elif r % 2 != 0 and b % 2 != 0 and (g % 2 != 0) and (w % 2 == 0):
		ans = 1
	elif w % 2 != 0:
		if r % 2 != 0 and b % 2 != 0 and (g % 2 == 0) and (g > 0):
			ans = 1
		elif g % 2 != 0 and b % 2 != 0 and (r % 2 == 0) and (r > 0):
			ans = 1
		elif r % 2 != 0 and g % 2 != 0 and (b % 2 == 0) and (b > 0):
			ans = 1
		else:
			ans = 0
	elif w % 2 == 0:
		if r % 2 == 0 and b % 2 == 0 and (g % 2 != 0):
			ans = 1
		elif g % 2 == 0 and b % 2 == 0 and (r % 2 != 0):
			ans = 1
		elif r % 2 == 0 and g % 2 == 0 and (b % 2 != 0):
			ans = 1
		else:
			ans = 0
	if ans == 0:
		print('No')
	else:
		print('Yes')


for t in range(int(input())):
	m = list(map(int, input().split()))
	odd = sum(map(lambda x: x & 1, m))
	print('YNeos'[int(odd == 2 or (not all(m[:-1]) and odd == 3))::2])


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	x = r % 2 + g % 2 + b % 2 + w % 2
	a = r * g * b
	if (r + g + b + w) % 2 == 0:
		if x == 0:
			print('Yes')
		elif x == 4 and a != 0:
			print('Yes')
		else:
			print('No')
	elif x == 1:
		print('Yes')
	elif x == 3 and a != 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b, c, d) = map(int, input().split())
	t = a + b + c + d
	if t % 2 == 0:
		if a % 2 == b % 2 and b % 2 == c % 2:
			print('Yes')
		else:
			print('No')
	else:
		k = a % 2 + b % 2 + c % 2
		if k == 3 or k == 0 or k == 1:
			print('Yes')
		elif a > 0 and b > 0 and (c > 0):
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	x = [i for i in l if i % 2 != 0]
	if len(x) == 0 or len(x) == 1:
		print('Yes')
	elif l[0] != 0 and l[1] != 0 and (l[2] != 0):
		l[0] = l[0] - 1
		l[1] = l[1] - 1
		l[2] = l[2] - 1
		l[3] += 3
		x = [i for i in l if i % 2 != 0]
		if len(x) == 0 or len(x) == 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	ok = False
	ans = 0
	if r % 2 == 1:
		ans += 1
	if g % 2 == 1:
		ans += 1
	if b % 2 == 1:
		ans += 1
	if w % 2 == 1:
		ans += 1
	if ans <= 1:
		ok = True
	if r != 0 and g != 0 and (b != 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		ans = 0
		if r % 2 == 1:
			ans += 1
		if g % 2 == 1:
			ans += 1
		if b % 2 == 1:
			ans += 1
		if w % 2 == 1:
			ans += 1
		if ans <= 1:
			ok = True
	if ok == True:
		print('YES')
	else:
		print('NO')


import math as mt

def tran(arr):
	if arr[0] == 0 or arr[1] == 0 or arr[2] == 0:
		o = 0
		for i in arr:
			if i % 2 == 1:
				o += 1
		if o > 1:
			return 'No'
		else:
			return 'Yes'
	else:
		o = 0
		for i in arr:
			if i % 2 == 1:
				o += 1
		if o == 2:
			return 'No'
		else:
			return 'Yes'

def __starting_point():
	t = int(input())
	ans = []
	for i in range(t):
		nk = list(map(int, input().rstrip().split()))
		r = tran(nk)
		ans.append(r)
	for i in ans:
		print(i)
__starting_point()


def computing(balls):
	even = 0
	for e in balls:
		if e % 2 == 0:
			even += 1
	if even == 2:
		return False
	if even == 1:
		if 0 in balls and balls[3] != 0:
			return False
	return True
t = int(input())
res = []
for i in range(t):
	(r, g, b, w) = [int(i) for i in input().split()]
	balls = [r, g, b, w]
	res.append(computing(balls))
for i in range(t):
	if res[i]:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	if arr[1] % 2 + arr[2] % 2 + arr[0] % 2 == 3:
		print('Yes')
	elif arr[3] % 2 + arr[1] % 2 + arr[2] % 2 + arr[0] % 2 == 3:
		flag = 0
		for i in arr:
			if i == 0:
				flag += 1
		if flag == 0:
			print('Yes')
		else:
			print('No')
	elif arr[3] % 2 + arr[1] % 2 + arr[2] % 2 + arr[0] % 2 <= 1:
		print('Yes')
	else:
		print('NO')


from sys import stdin, stdout
import math, queue, heapq
fastinput = stdin.readline
fastout = stdout.write
t = int(fastinput())
while t:
	t -= 1
	x = list(map(int, fastinput().split()))
	cnte = 0
	cnto = 0
	for i in x:
		if i % 2 == 0:
			cnte += 1
		else:
			cnto += 1
	if (x[0] == 0 or x[1] == 0 or x[2] == 0) and cnto > 1:
		print('NO')
	elif cnto == 1 or cnto == 0:
		print('YES')
	else:
		x[0] -= 1
		x[1] -= 1
		x[2] -= 1
		x[3] += 3
		cnte = 0
		cnto = 0
		for i in x:
			if i % 2 == 0:
				cnte += 1
			else:
				cnto += 1
		if cnto == 1 or cnto == 0:
			print('YES')
		else:
			print('NO')


def palindrome(r, g, b, w):
	(flag1, flag2) = (0, 0)
	for i in [r, g, b, w]:
		if flag1 == 0:
			if i % 2:
				flag1 = 1
				continue
		if flag1 == 1:
			if i % 2:
				flag2 = 1
	if flag1 and flag2:
		return False
	else:
		return True
t = int(input())
a = [[0] * 4] * t
for i in range(t):
	a[i] = list(map(int, input().split()))
for i in range(t):
	if a[i][0] != 0 and a[i][1] != 0 and (a[i][2] != 0):
		if not palindrome(a[i][0], a[i][1], a[i][2], a[i][3]):
			a[i][0] -= 1
			a[i][1] -= 1
			a[i][2] -= 1
			a[i][3] += 3
			if palindrome(a[i][0], a[i][1], a[i][2], a[i][3]):
				print('Yes')
			else:
				print('No')
			continue
		else:
			print('Yes')
			continue
	elif palindrome(a[i][0], a[i][1], a[i][2], a[i][3]):
		print('Yes')
	else:
		print('No')


for j in range(int(input())):
	li = list(map(int, input().split()))
	count = 0
	for j in li:
		if j % 2 != 0:
			count += 1
	if count == 2:
		print('No')
	elif count <= 1 or count == 4:
		print('Yes')
	elif count == 3 and li[0] >= 1 and (li[1] >= 1) and (li[2] >= 1) and (li[3] >= 1):
		print('Yes')
	elif count == 3 and li[0] == 1 and (li[1] == 1) and (li[2] == 1) and (li[3] == 0):
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	l = list(map(int, input().split()))
	ctr = 0
	for i in l:
		if i % 2 == 1:
			ctr += 1
	if ctr <= 1:
		print('YES')
		continue
	for i in range(1):
		if l[0] > 0 and l[1] > 0 and (l[2] > 0):
			l[0] -= 1
			l[1] -= 1
			l[2] -= 1
			l[3] += 3
	ctr = 0
	for i in l:
		if i % 2 == 1:
			ctr += 1
	if ctr <= 1:
		print('YES')
	else:
		print('NO')


x = int(input())
for i in range(1, x + 1, 1):
	count = 0
	mn = 10000000000
	sura = list(map(int, input().split()))
	for j in range(0, 4, 1):
		if sura[j] % 2 == 0:
			count += 1
	if count >= 3:
		print('Yes')
		continue
	for j in range(0, 3, 1):
		mn = min(mn, sura[j])
	if mn < 1:
		print('No')
		continue
	for j in range(0, 3, 1):
		sura[j] -= 1
	sura[3] += 3 * 1
	count = 0
	for j in range(0, 4, 1):
		if sura[j] % 2 == 0:
			count += 1
	if count >= 3:
		print('Yes')
	else:
		print('No')


t = int(input())

def proverka(r, g, b, w):
	ch = 0
	nech = 0
	if r % 2 == 0:
		ch += 1
	else:
		nech += 1
	if g % 2 == 0:
		ch += 1
	else:
		nech += 1
	if b % 2 == 0:
		ch += 1
	else:
		nech += 1
	if w % 2 == 0:
		ch += 1
	else:
		nech += 1
	if ch >= 3:
		otvet = 1
	elif nech >= 3:
		otvet = 0
	else:
		otvet = 'No'
	return otvet
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	h = min(r, g, b)
	otvet = proverka(r, g, b, w)
	if h == 0:
		if otvet == 1:
			print('Yes')
		else:
			print('No')
	elif otvet == 1 or otvet == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	a = [int(v) for v in input().split()]
	c = 0
	z = 0
	for j in range(4):
		if a[j] % 2 != 0:
			c = c + 1
	for j in range(3):
		if a[j] == 0:
			z = z + 1
	if c == 2:
		print('No')
	elif c <= 1:
		print('Yes')
	elif c == 3 and z > 0:
		print('No')
	elif c == 3 and z == 0:
		print('Yes')
	elif c == 4:
		print('Yes')


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	A = list(map(int, input().split()))
	AA = A[:]
	for i in range(len(A)):
		A[i] %= 2
	y = 0
	if sum(A) <= 1 or (sum(A) >= 3 and AA[:3].count(0) == 0):
		y = 1
	if y == 1:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(r, g, b, w) = [int(i) for i in input().split()]
	ps = 0
	if r % 2 == 0:
		ps += 1
	if g % 2 == 0:
		ps += 1
	if b % 2 == 0:
		ps += 1
	if w % 2 == 0:
		ps += 1
	if ps == 4:
		print('Yes')
	elif ps == 2:
		print('No')
	elif ps == 3:
		print('Yes')
	elif r > 0 and g > 0 and (b > 0):
		print('Yes')
	else:
		print('No')


t = int(input())
out = ((0, 0, 0, 0), (0, 0, 0, 1), (0, 0, 1, 0), (0, 1, 0, 0), (1, 0, 0, 0))
wth = ((0, 1, 1, 1), (1, 1, 1, 0), (1, 0, 1, 1), (1, 1, 0, 1), (1, 1, 1, 1))
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	seq = (r % 2, g % 2, b % 2, w % 2)
	if 0 in [r, g, b]:
		if seq in out:
			print('Yes')
		else:
			print('No')
	elif seq in wth or seq in out:
		print('Yes')
	else:
		print('No')


def abc(r, g, b, w):
	if w % 2 == 0:
		if r % 2 == 0 and g % 2 == 0 or (r % 2 == 0 and b % 2 == 0) or (b % 2 == 0 and g % 2 == 0):
			print('Yes')
		elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0):
			if min(r, g, b) >= 1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
		print('Yes')
	elif r % 2 == 0 and g % 2 == 0 or (r % 2 == 0 and b % 2 == 0) or (b % 2 == 0 and g % 2 == 0):
		print('No')
	elif r % 2 != 0 and g % 2 != 0 or (r % 2 != 0 and b % 2 != 0) or (b % 2 != 0 and g % 2 != 0):
		if min(r, g, b) >= 1:
			print('Yes')
		else:
			print('No')
	elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0):
		if min(r, g, b) >= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')
t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	abc(a[0], a[1], a[2], a[3])


def Do_something(r, g, w, b):
	s = ''
	s += str(r % 2)
	s += str(g % 2)
	s += str(b % 2)
	s += str(w % 2)
	return s

def ans(r, g, b, w):
	s = Do_something(r, g, b, w)
	if min(r, g, b) > 0:
		s2 = Do_something(r - 1, g - 1, b - 1, w + 3)
	if s in ['0000', '1000', '0100', '0010', '0001']:
		return 'Yes'
	if min(r, g, b) > 0:
		if s2 in ['0000', '1000', '0100', '0010', '0001']:
			return 'Yes'
	return 'No'
L = []
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	L.append(ans(r, g, b, w))
for l in L:
	print(l)


import time, math as mt, bisect as bs, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * (2 * 10 ** 5 + 5)
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(2 * 10 ** 5 + 5):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj
mod = 10 ** 9 + 7

def solve():
	li = L()
	w = li[-1]
	li = li[:3]
	odd = 0
	for ele in li:
		if ele % 2:
			odd += 1
	if odd == 0 or odd == 3:
		P('YES')
		return
	elif odd == 1:
		if w % 2:
			P('NO')
			return
		else:
			P('YES')
			return
	elif odd == 2:
		if 0 not in li:
			w = w + 3
		else:
			P('NO')
			return
		if w % 2 == 0:
			P('YES')
			return
		else:
			P('NO')
			return
	return
t = II()
for i in range(t):
	solve()


def check(a, b, c, d):
	if a % 2 + b % 2 + c % 2 + d % 2 > 1:
		return False
	else:
		return True
n = int(input())
for i in range(n):
	(a, b, c, d) = map(int, input().split())
	if check(a, b, c, d):
		print('Yes')
		continue
	elif a > 0 and b > 0 and (c > 0) and check(a - 1, b - 1, c - 1, d + 1):
		print('Yes')
		continue
	else:
		print('No')


from sys import stdin, stdout
from collections import Counter, OrderedDict
import math
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(str(val) + ' ')
	cout('\n')
(t,) = mp()
for _ in range(t):
	(r, g, b, w) = mp()
	cnt = 0
	for i in [r, g, b, w]:
		cnt += (i % 2 == 1) * 1
	if cnt < 2 or cnt == 4:
		cout('Yes\n')
	elif cnt == 2:
		cout('No\n')
	elif cnt == 3:
		if not r or not g or (not b):
			cout('No\n')
		else:
			cout('Yes\n')
	else:
		cout('No\n')


for k in range(int(input())):
	t = list(map(int, input().split()))
	u = 0
	for j in t:
		if j % 2 != 0:
			u += 1
	if u <= 1:
		print('Yes')
	else:
		x = 0
		a = min(t[:3])
		if a >= 1:
			t[0] -= 1
			t[1] -= 1
			t[2] -= 1
			t[-1] += 3
			for j in t:
				if j % 2 != 0:
					x += 1
			if x <= 1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


for s in [*open(0)][1:]:
	a = (*map(int, s.split()),)
	n = sum((x % 2 for x in a))
	print('YNeos'[n == 2 or (n > 2 and 0 in a[:3])::2])


for i in range(int(input())):
	(r, g, y, w) = map(int, input().split())
	if r % 2 + g % 2 + y % 2 + w % 2 <= 1:
		print('YES')
	elif (r > 0 and g > 0 and (y > 0)) and (r - 1) % 2 + (g - 1) % 2 + (y - 1) % 2 + (w + 3) % 2 <= 1:
		print('YES')
	else:
		print('NO')


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(r, g, b, w):
	n = r + g + b + w
	odd_cnt = (1 if r % 2 else 0) + (1 if g % 2 else 0) + (1 if b % 2 else 0) + (1 if w % 2 else 0)
	if n % 2 == 0:
		return odd_cnt == 0
	else:
		return odd_cnt == 1

def main():
	for _ in range(ri()):
		(r, g, b, w) = ria()
		ans = solve(r, g, b, w)
		if not ans and r > 0 and (g > 0) and (b > 0):
			ans = solve(r - 1, g - 1, b - 1, w + 1)
		if ans:
			ws('YES')
		else:
			ws('NO')
main()


for _ in range(int(input())):
	balls = list(map(int, input().split()))
	odd = 0
	for i in range(len(balls)):
		if balls[i] % 2 == 1:
			odd += 1
	if odd <= 1:
		print('YES')
	elif balls[0] == 0 or balls[1] == 0 or balls[2] == 0:
		print('NO')
	else:
		odd = 0
		balls[0] -= 1
		balls[1] -= 1
		balls[2] -= 1
		balls[3] += 3
		for i in range(len(balls)):
			if balls[i] % 2 == 1:
				odd += 1
		if odd <= 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	[r, g, b, w] = map(int, input().split())
	signs = []
	for x in [r, g, b, w]:
		signs.append(x & 1)
	va = len(list(filter(lambda t: t == 1, signs)))
	answer = 'No'
	if va <= 1:
		answer = 'Yes'
	if va >= 3:
		if r > 0 and g > 0 and (b > 0):
			answer = 'Yes'
	print(answer)


def buscar(numeros):
	cantidad = 0
	for g in range(len(numeros)):
		if numeros[g] % 2 != 0:
			cantidad = cantidad + 1
	if cantidad <= 1:
		return 'YES'
	else:
		return 'NO'
for _ in range(int(input())):
	numeros = list(map(int, input().split()))
	check = [numeros[0], numeros[1], numeros[2]]
	result = buscar(numeros)
	if result == 'YES':
		print(result)
		continue
	if all(list(map(lambda x: x > 0, check))):
		numeros[0] = numeros[0] - 1
		numeros[1] = numeros[1] - 1
		numeros[2] = numeros[2] - 1
		numeros[3] = numeros[3] + 3
		result = buscar(numeros)
	print(result)


def main():
	t = int(input())
	for tt in range(t):
		(r, g, b, w) = map(int, input().split())
		if r % 2 + g % 2 + b % 2 + w % 2 < 2:
			print('Yes')
		else:
			c = 0
			while True:
				w = w + 3
				b = b - 1
				r = r - 1
				g = g - 1
				if r < 0 or g < 0 or b < 0:
					break
				if r % 2 + g % 2 + b % 2 + w % 2 == 2:
					c = 0
					break
				if r % 2 + g % 2 + b % 2 + w % 2 < 2:
					c = 1
					print('Yes')
					break
			if c == 0:
				print('No')
main()


t = int(input())
while t > 0:
	t = t - 1
	a = input().split()
	r = int(a[0])
	b = int(a[1])
	g = int(a[2])
	w = int(a[3])
	if 0 == r or b == 0 or g == 0:
		if r % 2 + b % 2 + g % 2 + w % 2 < 2:
			print('Yes')
		else:
			print('No')
	elif r % 2 + b % 2 + g % 2 == 0:
		print('Yes')
	elif r % 2 + b % 2 + g % 2 == 3:
		print('Yes')
	elif r % 2 + b % 2 + g % 2 == 1:
		if w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif w % 2 == 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	su1 = r + g + b + w
	k = min(r, g, b)
	su = r % 2 + g % 2 + b % 2 + w % 2
	if su1 % 2 == 1:
		if su == 3:
			if k == 0:
				print('No')
			else:
				print('Yes')
		else:
			print('Yes')
	elif su == 4:
		print('Yes')
	elif su == 2:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	o = sum((i & 1 for i in [r, g, b]))
	e = sum((i > 0 and i % 2 == 0 for i in [r, g, b]))
	ans = 'No'
	if o == e == 0:
		ans = 'Yes'
	if o == 3:
		ans = 'Yes'
	if o == 2 and e and w & 1:
		ans = 'Yes'
	if o == 1 and w % 2 == 0:
		ans = 'Yes'
	if o == 0:
		ans = 'Yes'
	print(ans)


for _ in range(int(input())):
	lis = list(map(int, input().split()))
	eve = 0
	for x in lis:
		if x % 2 == 0:
			eve += 1
	else:
		if eve >= 3:
			print('YES')
		elif 0 not in lis[:-1]:
			(lis[0], lis[1], lis[2], lis[3]) = (lis[0] - 1, lis[1] - 1, lis[2] - 1, lis[3] + 3)
			eve = 0
			for x in lis:
				if x % 2 == 0:
					eve += 1
			else:
				if eve >= 3:
					print('YES')
				else:
					print('NO')
		else:
			print('NO')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	(t, c1) = (0, 0)
	if a % 2 == 0 and b % 2 == 0 and (c % 2 == 0) or (a % 2 != 0 and b % 2 != 0 and (c % 2 != 0)):
		print('Yes')
	else:
		if a % 2 == 0:
			c1 += 1
		else:
			t += 1
		if b % 2 == 0:
			c1 += 1
		else:
			t += 1
		if c % 2 == 0:
			c1 += 1
		else:
			t += 1
		if c1 == 2 and t == 1 and (d % 2 == 0):
			print('Yes')
		else:
			z = 0
			if a == 0 or b == 0 or c == 0:
				z += 1
			if t == 2 and c1 == 1 and (d % 2 != 0) and (z == 0):
				print('Yes')
			else:
				print('No')


t = int(input())
for i in range(t):
	(a, b, c, d) = [int(x) for x in input().split(' ')]
	total_even = 0
	if a % 2 == 0:
		total_even += 1
	if b % 2 == 0:
		total_even += 1
	if c % 2 == 0:
		total_even += 1
	if d % 2 == 0:
		total_even += 1
	if a == 0 or b == 0 or c == 0:
		if total_even >= 3:
			print('Yes')
		else:
			print('No')
	elif total_even >= 3:
		print('Yes')
	else:
		a -= 1
		b -= 1
		c -= 1
		d += 3
		total_even = 0
		if a % 2 == 0:
			total_even += 1
		if b % 2 == 0:
			total_even += 1
		if c % 2 == 0:
			total_even += 1
		if d % 2 == 0:
			total_even += 1
		if total_even >= 3:
			print('Yes')
		else:
			print('No')


for t in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	l = [r, g, b, w]
	odd = 0
	for i in l:
		if i % 2 == 1:
			odd += 1

	def check(l):
		l[0] -= 1
		l[1] -= 1
		l[2] -= 1
		l[3] += 3
		odd = 0
		for i in l:
			if i % 2 == 1:
				odd += 1
		return odd <= 1
	if odd > 1:
		if r > 0 and g > 0 and (b > 0):
			print('YES' if check(l) else 'NO')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	odds = sum([x % 2 for x in [r, g, b, w]])
	need = sum([r, g, b, w]) % 2
	if min([r, g, b]) == 0:
		if need and odds == 1:
			print('YES')
		elif not need and odds == 0:
			print('YES')
		else:
			print('NO')
	elif need == 0:
		print('YES' if odds in [0, 4] else 'NO')
	else:
		print('YES' if odds in [1, 3] else 'NO')


import io, os
from collections import deque
import bisect
from collections import deque
RL = lambda : list(map(int, input().split(' ')))
T = int(input())
for _ in range(T):
	(r, g, b, w) = RL()
	mi = min(r, g, w)
	ev = 0
	if r % 2 == 0:
		ev += 1
	if g % 2 == 0:
		ev += 1
	if b % 2 == 0:
		ev += 1
	flag = 1
	if ev == 3:
		falg = 1
	elif ev == 2:
		if w % 2 == 0:
			flag = 1
		else:
			flag = 0
	elif ev == 1:
		if w % 2 == 0:
			flag = 0
		elif r != 0 and b != 0 and (g != 0):
			flag = 1
		else:
			flag = 0
	if flag == 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	o = 0
	e = 0
	for i in [r, g, b, w]:
		if i % 2 == 0:
			e += 1
	o = 4 - e
	if o <= 1:
		print('Yes')
	elif o == 4:
		print('Yes')
	elif o == 3:
		if r > 0 and b > 0 and (g > 0):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def check(r, g, b, w):
	n = 0
	if r % 2 == 0:
		n += 1
	if g % 2 == 0:
		n += 1
	if b % 2 == 0:
		n += 1
	if w % 2 == 0:
		n += 1
	if n == 3 or n == 4:
		return 1
	else:
		return 0
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if check(r, g, b, w) == 1 or (r > 0 and g > 0 and (b > 0) and check(r - 1, g - 1, b - 1, w + 3)) == 1:
		print('yes')
	else:
		print('No')


for _ in range(int(input())):
	(R, G, B, W) = (int(x) for x in input().split())
	if R % 2 + G % 2 + B % 2 + W % 2 <= 1:
		print('Yes')
	elif R == 0 or B == 0 or G == 0:
		print('No')
	else:
		t = min(R, G, B)
		if t % 2 == 1:
			pass
		else:
			t = t - 1
		R -= t
		G -= t
		B -= t
		W += 3 * t
		if R % 2 + G % 2 + B % 2 + W % 2 <= 1:
			print('Yes')
		else:
			print('No')


from collections import Counter

def check(c):
	if c[1] < 2:
		return True
	if c[1] > 2 and all((i > 0 for i in [r, g, b])):
		return True
	return False
for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	chk = check(Counter([r % 2, g % 2, b % 2, w % 2]))
	print('Yes' if chk else 'No')


for _ in range(int(input())):
	(r, g, b, w) = [int(x) for x in input().split()]
	odd_sum = sum([x % 2 for x in [r, g, b, w]])
	print('No' if odd_sum == 2 or (odd_sum > 2 and 0 in [r, g, b]) else 'Yes')


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	(r, g, b, w) = spin()

	def check(r, g, b, w):
		if r % 2 + g % 2 + b % 2 + w % 2 > 1:
			return False
		else:
			return True
	if check(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and check(r - 1, g - 1, b - 1, w + 3):
		print('Yes')
	else:
		print('No')


from math import ceil
from sys import stdin, stdout, setrecursionlimit
from random import randint
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	cnt = 0
	cnt += r % 2
	cnt += g % 2
	cnt += b % 2
	cnt += w % 2
	if cnt <= 1:
		print('Yes')
	elif r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		cnt = 0
		cnt += r % 2
		cnt += g % 2
		cnt += b % 2
		cnt += w % 2
		if cnt <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def check(r, g, b, w):
	q = [0] * 4
	if r % 2 == 1:
		q[0] += 1
	if g % 2 == 1:
		q[1] += 1
	if b % 2 == 1:
		q[2] += 1
	if w % 2 == 1:
		q[3] += 1
	if sum(q) == 0 or sum(q) == 1:
		return True
	else:
		return False
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if check(r, g, b, w):
		print('YES')
	elif r > 0 and g > 0 and (b > 0):
		r = r - 1
		b = b - 1
		g = g - 1
		w = w + 1
		if check(r, g, b, w):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


def readn():
	return int(input())

def readlist():
	return list(map(int, input().split()))

def readnos():
	return map(int, input().split())
for _ in range(readn()):
	a = readlist()
	cnt = 0
	cnt1 = 0
	for i in range(4):
		if a[i] % 2 != 0:
			cnt += 1
		if a[i] == 0 and i < 3:
			cnt1 += 1
	if cnt <= 1:
		print('YES')
	elif cnt1 == 0:
		for i in range(3):
			a[i] -= 1
		a[3] += 3
		cnt = 0
		for i in range(4):
			if a[i] % 2 != 0:
				cnt += 1
		if cnt <= 1:
			print('YES')
		else:
			b = a[0:3]
			b.sort()
			b.append(a[3])
			b[3] += b[0]
			b[2] -= b[0]
			b[1] -= b[0]
			b[0] = 0
			cnt = 0
			for i in range(4):
				if b[i] % 2 != 0:
					cnt += 1
			if cnt <= 1:
				print('YES')
			else:
				print('NO')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	odd_count = sum((i % 2 for i in [r, g, b, w]))
	if odd_count <= 1:
		print('YES')
	elif odd_count >= 3 and all((i != 0 for i in [r, g, b])):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(R, G, B, W) = [int(x) for x in input().split()]
		if R % 2 + G % 2 + B % 2 + W % 2 <= 1:
			print('Yes')
		elif R >= 1 and G >= 1 and (B >= 1):
			R -= 1
			G -= 1
			B -= 1
			W += 3
			if R % 2 + G % 2 + B % 2 + W % 2 <= 1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
main()


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())

def solve():
	(a, b, c, w) = mpint()
	count = [a & 1, b & 1, c & 1, w & 1]
	if not any(count):
		return True
	count.sort()
	if count[2] == 0:
		return True
	if a < 1 or b < 1 or c < 1:
		return False
	a -= 1
	b -= 1
	c -= 1
	w += 3
	count = [a & 1, b & 1, c & 1, w & 1]
	if not any(count):
		return True
	count.sort()
	if count[2] == 0:
		return True
	return False
for case in range(1, itg() + 1):
	print('Yes' if solve() else 'No')


t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	cnt_even = 0
	cnt_odd = 0
	for i in arr:
		if i % 2 == 0:
			cnt_even += 1
		else:
			cnt_odd += 1
	if 0 in arr[:3]:
		if cnt_odd == 0 or cnt_odd == 1:
			print('Yes')
		else:
			print('No')
	elif cnt_odd != 2:
		print('Yes')
	else:
		print('No')


for _ in range(0, int(input())):
	v = list(map(int, input().split()))
	c1 = sum([i % 2 for i in v]) < 2
	v2 = [v[0] - 1, v[1] - 1, v[2] - 1, v[3] + 3]
	c2 = all(v[:-1]) > 0 and sum([i % 2 for i in v2]) < 2
	if c1 or c2:
		print('Yes')
	else:
		print('No')


def count(arr):
	d = 0
	for i in arr:
		if i % 2:
			d += 1
	return d

def solve(arr):
	while min(arr[:3]) > 0 and count(arr[:3]) > 1:
		arr[0] -= 1
		arr[1] -= 1
		arr[2] -= 1
		arr[3] += 3
	d = count(arr[:3])
	if d > 1:
		return 'NO'
	elif d == 1 and arr[3] % 2:
		return 'NO'
	return 'YES'
for i in range(int(input())):
	arr = list(map(int, input().split()))
	print(solve(arr))


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	cnt = r % 2 + g % 2 + b % 2 + w % 2
	if cnt <= 1:
		print('YES')
		continue
	if r == 0 or g == 0 or b == 0:
		print('NO')
		continue
	r -= 1
	g -= 1
	b -= 1
	w += 3
	cnt = r % 2 + g % 2 + b % 2 + w % 2
	if cnt <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())

def odd_count(l):
	c = 0
	for i in l:
		if i % 2 == 1:
			c += 1
	return c
while t:
	(r, g, b, w) = map(int, input().split())
	odd = True if (r + g + b + w) % 2 == 1 else False
	oc = odd_count([r, g, b, w])
	if r == 0 or b == 0 or g == 0:
		if odd and 1 == oc or (not odd and 0 == oc):
			print('Yes')
		else:
			print('No')
	elif odd and (1 == oc or 3 == oc) or (not odd and (0 == oc or 4 == oc)):
		print('Yes')
	else:
		print('No')
	t -= 1


def check(r, g, b, w):
	return False if r % 2 + g % 2 + b % 2 + w % 2 > 1 else True
t = int(input())
while t > 0:
	t -= 1
	(r, g, b, w) = map(int, input().split())
	if check(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and check(r - 1, g - 1, b - 1, w + 1):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	a = [int(x) for x in input().split(' ')]
	e = 0
	for i in a:
		if i % 2 == 0:
			e += 1
	if e == 2 or (e < 2 and min(a[:3]) == 0):
		print('no')
	else:
		print('yes')


t = int(input())
for _ in range(t):
	n = list(map(int, input().split()))
	count = 0
	for j in n:
		if j % 2 != 0:
			count += 1
	if count <= 1:
		ans = 'Yes'
	elif min(n[:3]) >= 1 and count >= 3:
		ans = 'Yes'
	else:
		ans = 'No'
	print(ans)


for i in range(int(input())):
	(r, g, b, w) = [int(i) for i in input().split()]
	c = 0
	if r % 2 == 1:
		c += 1
	if g % 2 == 1:
		c += 1
	if b % 2 == 1:
		c += 1
	if w % 2 == 1:
		c += 1
	c2 = 0
	if r == 0 or g == 0 or b == 0:
		c2 = 1
	if c <= 1 or (c >= 3 and c2 == 0):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	lis = list(map(int, input().split()))
	eve = odd = c = 0
	for i in lis:
		c += i % 2
	if c == 0 or c == 1 or c == 4:
		print('YES')
	elif c == 2:
		print('NO')
	elif min(lis[:3]) != 0:
		print('YES')
	else:
		print('NO')


tc = int(input())
for _ in range(tc):
	a = list(map(int, input().split()))
	cnt = 0
	for i in a:
		if i % 2 != 0:
			cnt += 1
	if cnt <= 1:
		print('Yes')
		continue
	if a[0] > 0 and a[1] > 0 and (a[2] > 0):
		a[0] -= 1
		a[1] -= 1
		a[2] -= 1
		a[3] += 1
	cnt = 0
	for i in a:
		if i % 2 == 1:
			cnt += 1
	if cnt <= 1:
		print('Yes')
	else:
		print('No')


inp = lambda : map(int, input().split(' '))
(t,) = inp()
for _ in range(t):
	even = False
	(r, g, b, w) = inp()
	if (r + g + b + w) % 2 == 0:
		even = True
	val = r % 2 + g % 2 + b % 2
	if even:
		if val == 0 or val == 3:
			print('Yes')
		else:
			print('No')
	elif val == 2 and (r == 0 or g == 0 or b == 0):
		print('No')
	else:
		print('Yes')


n = int(input())
for ii in range(n):
	balls = [int(_) for _ in input().split()]
	countOdd = 0
	zero = 0
	for i in range(len(balls)):
		if balls[i] % 2 != 0:
			countOdd += 1
		if balls[i] == 0:
			zero += 1
	if countOdd == 0:
		print('Yes')
	elif countOdd == 1:
		print('Yes')
	elif countOdd == 2:
		print('No')
	elif countOdd == 3:
		if zero == 0:
			print('Yes')
		elif balls[-1] == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


t = int(input())
for case in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	l = [r, g, b, w]
	ans = 0
	ct = 0
	for i in l:
		if i % 2 != 0:
			ct += 1
	if sum(l) % 2 != 0 and ct == 1:
		ans = 1
	elif sum(l) % 2 == 0 and ct == 0:
		ans = 1
	v = min(g, b)
	v = min(r, v)
	v = min(1, v)
	r -= v
	g -= v
	b -= v
	w += 3 * v
	l = [r, g, b, w]
	ct = 0
	for i in l:
		if i % 2 != 0:
			ct += 1
	if sum(l) % 2 != 0 and ct == 1:
		ans = 1
	elif sum(l) % 2 == 0 and ct == 0:
		ans = 1
	print('Yes') if ans == 1 else print('No')


for i in range(int(input())):
	l = list(map(int, input().split()))
	d = {'e': 0, 'o': 0}
	for j in l:
		if j % 2 == 0:
			d['e'] += 1
		else:
			d['o'] += 1
	if 0 not in l[:3]:
		if d['e'] == 2:
			print('No')
		else:
			print('Yes')
	elif d['e'] == 3 or d['e'] == 4:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	numOdd = 0
	for j in range(4):
		if a[j] % 2 == 0:
			numOdd += 1
	if numOdd == 2 or (min(a[:3]) == 0 and numOdd == 1):
		print('NO')
	else:
		print('YES')


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
I = sys.stdin.readline

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	ans = ''
	for _ in range(ii()):
		(r, g, b, w) = mi()
		if r == g and r == b and (r == w):
			ans += 'Yes\n'
		else:
			t = [r, g, b, w]
			cnt = 0
			for i in t:
				if i % 2:
					cnt += 1
			if cnt == 1 or cnt == 0:
				ans += 'Yes\n'
			else:
				op = min(r, g, b)
				ct = 0
				if op > 0:
					r -= 1
					g -= 1
					b -= 1
					w += 3
					for i in [r, g, b, w]:
						if i % 2:
							ct += 1
					if ct <= 1:
						ans += 'Yes\n'
					else:
						ans += 'No\n'
				else:
					ans += 'No\n'
	print(ans)
main()


def even3_odd1(lis):
	even_count = 0
	odd_count = 0
	for k in lis:
		if k % 2 == 0:
			even_count = even_count + 1
		else:
			odd_count = odd_count + 1
	if even_count == 3 and odd_count == 1:
		return 1
	else:
		return 0

def even1_odd3(lis):
	even_count = 0
	odd_count = 0
	for k in lis:
		if k % 2 == 0:
			even_count = even_count + 1
		else:
			odd_count = odd_count + 1
	if even_count == 1 and odd_count == 3:
		return 1
	else:
		return 0
for i in range(int(input())):
	lis = [x for x in map(int, input().split())]
	total = 0
	for j in lis:
		total = total + j
	if total % 2 == 0:
		if lis[0] % 2 == 0 and lis[1] % 2 == 0 and (lis[2] % 2 == 0) and (lis[3] % 2 == 0) or (lis[0] % 2 == 1 and lis[1] % 2 == 1 and (lis[2] % 2 == 1) and (lis[3] % 2 == 1)):
			print('Yes')
		else:
			print('No')
	elif even3_odd1(lis):
		print('Yes')
	elif even1_odd3(lis):
		if 0 in lis[0:3]:
			print('No')
		else:
			print('Yes')


a = input()
for x in range(int(a)):
	c = input().split(' ')
	list1 = [int(c[i]) for i in range(len(c) - 1)]
	list2 = [int(i) % 2 for i in c]
	if list2.count(1) <= 1:
		print('YES')
	elif min(list1) == 0:
		if list2.count(1) <= 1:
			print('YES')
		else:
			print('NO')
	elif list2.count(1) == 4 or list2.count(1) == 3:
		print('YES')
	else:
		print('NO')


def count():
	ans = 0
	if not r % 2:
		ans += 1
	if not g % 2:
		ans += 1
	if not b % 2:
		ans += 1
	if not w % 2:
		ans += 1
	return ans
for nt in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if count() >= 3:
		print('Yes')
		continue
	if min(r, g, b) > 0:
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if count() >= 3:
			print('Yes')
		else:
			print('No')
		continue
	print('No')


def countEven(r, g, b, w):
	res = 0
	if r % 2 == 0 and r != 0:
		res += 1
	if g % 2 == 0 and g != 0:
		res += 1
	if b % 2 == 0 and b != 0:
		res += 1
	if w % 2 == 0 and w != 0:
		res += 1
	return res

def canChange(r, g, b, w):
	a = [r, g, b, w]
	if a.count(0) == 4:
		return True
	elif a.count(0) == 3:
		return True
	elif a.count(0) == 2:
		if countEven(r, g, b, w) == 2:
			return True
		elif countEven(r, g, b, w) == 1:
			return True
		return False
	elif a.count(0) == 1:
		if w == 0:
			return True
		elif countEven(r, g, b, w) == 3:
			return True
		elif countEven(r, g, b, w) == 2:
			return True
		elif countEven(r, g, b, w) == 1:
			return False
		else:
			return False
	else:
		if countEven(r, g, b, w) == 2:
			return False
		return True
t = int(input())
for i in range(t):
	(r, g, b, w) = [int(x) for x in input().split()]
	if canChange(r, g, b, w):
		print('Yes')
	else:
		print('No')


def d4c(r, g, b, w):
	l1 = [r, g, b, w]
	x1 = 0
	for i in l1:
		if i % 2:
			x1 += 1
	if x1 <= 1:
		return 'Yes'
	if r == 0 or g == 0 or b == 0:
		return 'No'
	l1 = [r - 1, g - 1, b - 1, w + 3]
	x1 = 0
	for i in l1:
		if i % 2:
			x1 += 1
	if x1 <= 1:
		return 'Yes'
	return 'No'
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	print(d4c(r, g, b, w))


import sys

def can_palindrome(balls):
	parity = [b % 2 for b in balls]
	S = sum(parity)
	if S == 0 or S == 1:
		return True
	if balls[0] and balls[1] and balls[2]:
		parity = [1 if p == 0 else 0 for p in parity]
	S = sum(parity)
	if S == 0 or S == 1:
		return True
	return False

def main():
	test_cases = int(sys.stdin.readline())
	for _ in range(test_cases):
		balls = [int(i) for i in sys.stdin.readline().split()]
		if can_palindrome(balls):
			print('Yes')
		else:
			print('No')
main()


for asda in range(int(input())):
	(r, g, b, w) = input().split()
	r = int(r)
	g = int(g)
	b = int(b)
	w = int(w)
	l = min(r, g, b)
	count = 0
	if r % 2 == 0:
		count = count + 1
	if g % 2 == 0:
		count = count + 1
	if b % 2 == 0:
		count = count + 1
	if count == 0 or count == 3:
		print('Yes')
		continue
	if count == 2:
		if w % 2 == 0:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if count == 1:
		if l == 0:
			print('No')
		elif w % 2 == 0:
			print('No')
		else:
			print('Yes')


import collections

def solve(lst):
	if sum(lst) == 0:
		return 'Yes'
	od = 0
	for i in lst:
		if i % 2 == 1:
			od += 1
	if od == 0:
		return 'Yes'
	if (not lst[0] or not lst[1] or (not lst[2])) and od > 1:
		return 'No'
	if od == 2:
		return 'No'
	return 'Yes'
n = int(input())
ans = []
for i in range(n):
	lst = list(map(int, input().split(' ')))
	ans.append(solve(lst))
for i in ans:
	print(i)


import math
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	turn = 0
	x = r % 2
	y = g % 2
	z = b % 2
	v = w % 2
	if r * g * b == 0:
		if x + y + z + v <= 1:
			turn = 1
	elif x + y + z + v <= 1 or 4 - (x + y + z + v) <= 1:
		turn = 1
	if turn == 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	arr = [int(t) for t in input().split()]
	check = 0
	for t in arr:
		if t % 2 == 0:
			check += 1
	if check == 2 or (check < 2 and min(arr[:3]) == 0):
		print('No')
	else:
		print('Yes')


for u in range(int(input())):
	(x, y, z, w) = map(int, input().split())
	s = x % 2 + z % 2 + y % 2 + w % 2
	if s <= 1:
		print('Yes')
	elif s >= 3 and x > 0 and (z > 0) and (y > 0):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	s = r % 2 + g % 2 + b % 2 + w % 2
	print('YES' if s < 2 or (r * g * b and s > 2) else 'NO')


test = int(input())
result = []
for t in range(test):
	rgbw = [int(color) for color in input().split()]
	even = 0
	for c in rgbw:
		if c % 2 == 0:
			even += 1
	if even == 4:
		result.append('YES')
	elif even == 0:
		result.append('YES')
	elif even == 1 and rgbw[3] == 0:
		result.append('YES')
	elif even == 1 and rgbw[3] != 0 and (0 in rgbw):
		result.append('NO')
	elif even == 1 and rgbw[3] != 0 and (0 not in rgbw):
		result.append('YES')
	elif even == 2:
		result.append('NO')
	elif even == 3:
		result.append('YES')
for r in range(len(result)):
	print(result[r])


t = int(input())
for tt in range(t):
	d = [int(x) for x in input().split(' ')]
	x = 0
	for dd in d:
		x += dd % 2
	if x == 0:
		print('YES')
	elif x == 1:
		print('YES')
	elif d[0] == 0 or d[1] == 0 or d[2] == 0:
		print('NO')
	else:
		d[0] -= 1
		d[1] -= 1
		d[2] -= 1
		d[3] += 3
		xx = 0
		for dd in d:
			xx += dd % 2
		if xx == 0:
			print('YES')
		elif xx == 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	o = 0
	for i in a:
		if i % 2 == 1:
			o += 1
	if o <= 1:
		print('Yes')
		continue
	flag = 0
	if a[0] > 0 and a[1] > 0 and (a[2] > 0):
		e = 0
		for i in a:
			if i % 2 == 0:
				e += 1
		if e <= 1:
			print('Yes')
			flag = 1
	if flag == 0:
		print('No')


def solve(r, g, b, w):
	x = r % 2 + g % 2 + b % 2 + w % 2
	if x == 0 or x == 1 or (r and g and b and (x != 2)):
		return 'Yes'
	else:
		return 'No'
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	print(solve(r, g, b, w))


def test_palindrome(r, g, b, w):
	test = [x % 2 for x in [r, g, b, w]]
	return sum(test) <= 1
t = int(input())
for _ in range(t):
	(r, g, b, w) = [int(x) for x in input().split()]
	(r0, g0, b0, w0) = (r, g, b, w)
	adj = min(r, g, b)
	(r, g, b, w) = (r - adj, g - adj, b - adj, w + 3 * adj)
	possible = False
	for i in range(min(adj, 1) + 1):
		if test_palindrome(r, g, b, w):
			possible = True
		(r, g, b, w) = (r + 1, g + 1, b + 1, w - 3)
	print('Yes') if possible else print('No')


test = int(input())
for _ in range(test):
	balls = list(map(int, input().split()))
	t = min(balls[:3])
	odd = 0
	even = 0
	oddo = 0
	eveno = 0
	for i in range(4):
		if balls[i] % 2:
			oddo += 1
		else:
			eveno += 1
	for i in range(3):
		if balls[i] % 2:
			odd += 1
		else:
			even += 1
	if balls[-1] % 2:
		w = 1
	else:
		w = 0
	if eveno == 4 or (eveno == 3 and oddo == 1):
		print('YES')
	elif t:
		if w:
			w = 0
		else:
			w = 1
		(odd, even) = (even, odd)
		if w:
			odd += 1
		else:
			even += 1
		if even == 3 and odd == 1 or even == 4:
			print('YES')
		else:
			print('NO')
	else:
		if w:
			odd += 1
		else:
			even += 1
		if even == 3 and odd == 1 or even == 4:
			print('YES')
		else:
			print('NO')


def main():
	t = int(input())
	for _ in range(t):
		a = list(map(int, input().split()))
		o = 0
		e = 0
		for i in a:
			o += i % 2
		e = 4 - o
		if o <= 1:
			print('Yes')
		elif o >= 3:
			ok = 0
			for i in a[:3]:
				if i == 0:
					ok = 1
					break
			if not ok:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	return
main()


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def isValid(a):
	c = 0
	for i in a:
		if i % 2 != 0:
			c += 1
	if c > 1:
		return False
	return True

def main():
	t = inp()
	for _ in range(t):
		(r, g, b, w) = invr()
		maxOp = min(r, g, b, 2)
		f = False
		for _ in range(maxOp):
			r -= 1
			g -= 1
			b -= 1
			w += 3
			if isValid([r, g, b, w]):
				f = True
				break
		f = isValid([r, g, b, w])
		if f:
			print('Yes')
		else:
			print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	s = 0
	s1 = 0
	if r % 2 == 0:
		s += 1
	if g % 2 == 0:
		s += 1
	if b % 2 == 0:
		s += 1
	if w % 2 == 0:
		s1 += 1
	if s + s1 >= 3:
		print('Yes')
	elif s == 0:
		print('Yes')
	elif s == 1 and s1 == 0 and (r > 0) and (g > 0) and (b > 0):
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout

def fn(r, g, b, w):
	l = [r, g, b, w]
	l = [int(v % 2 == 0) for v in l]
	return l.count(1) >= 3
for _ in range(int(stdin.readline())):
	(r, g, b, w) = map(int, stdin.readline().split())
	if fn(r, g, b, w):
		print('Yes')
		continue
	if r * g * b == 0:
		if fn(r, g, b, w):
			print('Yes')
		else:
			print('No')
		continue
	par = [int(r % 2 == 0), int(g % 2 == 0), int(b % 2 == 0), int(w % 2 == 0)]
	e = par.count(1)
	o = par.count(0)
	if e >= 3:
		print('Yes')
		continue
	par = [int(r % 2 == 0), int(g % 2 == 0), int(b % 2 == 0)]
	e = par.count(1)
	o = par.count(0)
	if o >= 3 or (o >= 2 and w & 1):
		print('Yes')
		continue
	mn = min(r, b, g)
	if fn(r - mn, b - mn, g - mn, w + 3 * mn):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	(r, g, b, w) = a
	s = r % 2 + g % 2 + b % 2 + w % 2
	if 0 <= s <= 1 or (s >= 3 and 0 not in {r, g, b}):
		print('YES')
	else:
		print('NO')


def main():
	t = int(input())
	for i in range(t):
		solve()

def solve():

	def canBePalindrome():
		baseOdds = 0
		for i in range(3):
			if amount[i] & 1:
				baseOdds += 1
		whiteOdd = amount[3] & 1 == 1
		return baseOdds == 3 and amount[0] > 0 and (amount[1] > 0) and (amount[2] > 0) or (baseOdds == 2 and whiteOdd and (amount[0] > 0) and (amount[1] > 0) and (amount[2] > 0)) or (baseOdds == 1 and (not whiteOdd)) or (baseOdds == 0)
	amount = tuple(map(lambda x: int(x), input().split()))
	if canBePalindrome():
		print('Yes')
	else:
		print('No')
main()


for _ in range(int(input())):
	(r, g, b, w) = [int(_) for _ in input().split()]
	s = r % 2 + g % 2 + b % 2 + w % 2
	if r == 0 or g == 0 or b == 0:
		if s < 2:
			print('YES')
		else:
			print('NO')
	elif s == 2:
		print('NO')
	else:
		print('YES')


t = int(input())
for u in range(t):
	(r, g, b, w) = [int(x) for x in input().split()]
	if r * g * b == 0:
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			otv = 'Yes'
		else:
			otv = 'No'
	elif r % 2 + g % 2 + b % 2 + w % 2 != 2:
		otv = 'Yes'
	else:
		otv = 'No'
	print(otv)


def solve():
	(r, g, b, w) = map(int, input().split())
	nums = [0, 0]
	nums[r % 2] += 1
	nums[g % 2] += 1
	nums[b % 2] += 1
	nums[w % 2] += 1
	if nums[0] == 0 or nums[0] == 4 or nums[0] == 3:
		print('Yes')
		return
	if nums[0] == 2:
		print('No')
		return
	if nums[0] == 1:
		if 0 in (r, g, b):
			print('No')
		else:
			print('Yes')
for i in range(int(input())):
	solve()


for t in range(int(input())):
	nu = list(map(int, input().split()))
	re = sum((n % 2 for n in nu))
	if re < 2:
		print('YES')
	elif nu[0] > 0 and nu[1] > 0 and (nu[2] > 0) and (re > 2):
		print('YES')
	else:
		print('NO')


def ans(a, n):
	odd = 0
	even = 0
	for i in a:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 1:
		return 'Yes'
	if odd == 2:
		return 'No'
	if odd == 4 or odd == 0:
		return 'Yes'
	if odd == 3:
		x = a[:-1]
		zero = 0
		for i in x:
			if i == 0:
				zero = 1
		if zero == 1:
			return 'No'
		return 'Yes'
m = int(input())
for i in range(m):
	a = input().split()
	n = len(a)
	arr = []
	for i in a:
		arr.append(int(i))
	print(ans(arr, n))


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(a, b, c, d) = I()
	tf = 0
	cnt = 0
	while cnt < 10:
		cnt += 1
		if min(a, b, c) > 0:
			o = 0
			e = 0
			for i in [a, b, c, d]:
				if i % 2 == 0:
					e += 1
				else:
					o += 1
			if e >= 3:
				tf = 1
				break
			else:
				a -= 1
				b -= 1
				c -= 1
				d += 3
		else:
			o = 0
			e = 0
			for i in [a, b, c, d]:
				if i % 2 == 0:
					e += 1
				else:
					o += 1
			if e >= 3:
				tf = 1
			break
	print('Yes' if tf else 'No')


def odd_checker(v):
	tnt = v[0] % 2 + v[1] % 2 + v[2] % 2 + v[3] % 2
	return tnt

def main():
	test = int(input())
	for i in range(test):
		v = list(map(int, input().split()))
		p = odd_checker(v)
		if p <= 1:
			print('Yes')
		else:
			mon = min(v[0], v[1], v[2])
			if mon % 2 == 0 and mon != 0:
				mon -= 1
			v[0] -= mon
			v[1] -= mon
			v[2] -= mon
			v[3] += mon * 3
			num = odd_checker(v)
			if num <= 1:
				print('Yes')
			else:
				print('No')
main()


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())

	def soln():
		for arr in [(r, g, b, w), (r - 1, g - 1, b - 1, w + 3)]:
			if not all((num >= 0 for num in arr)):
				continue
			numOdds = 0
			for num in arr:
				if num % 2 == 1:
					numOdds += 1
			if numOdds <= 1:
				return 'Yes'
		return 'No'
	result = soln()
	print(result)


ans = []
for _ in range(int(input())):
	b = list(map(int, input().split()))
	l = []
	for __ in b:
		if __ % 2 == 0:
			l.append(0)
		else:
			l.append(1)
	if (sum(l) == 3 or sum(l) == 4) and (b[0] != 0 and b[1] != 0 and (b[2] != 0)):
		ans.append('YES')
	elif sum(l) == 1 or sum(l) == 0:
		ans.append('YES')
	else:
		ans.append('NO')
for ___ in ans:
	print(___)


from functools import lru_cache
from sys import stdin, stdout
import sys
for __ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	t = min(r, g, b)
	s = min(t, 1)
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		print('Yes')
	else:
		r -= s
		g -= s
		b -= s
		if s != 0:
			w += 3
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			print('Yes')
		else:
			print('No')


numCases = int(input())
for i in range(numCases):
	numbers = input().split(' ')
	numbers = list(map(int, numbers))
	numOdd = 0
	for number in numbers:
		if number % 2 != 0:
			numOdd += 1
	if numOdd < 2:
		print('Yes')
		continue
	if numbers[0] > 0 and numbers[1] > 0 and (numbers[2] > 0):
		numbers[0] -= 1
		numbers[1] -= 1
		numbers[2] -= 1
		numbers[3] += 3
		numOdd = 0
		for number in numbers:
			if number % 2 != 0:
				numOdd += 1
		if numOdd < 2:
			print('Yes')
			continue
	print('No')


t = int(input())
for i in range(0, t):
	a = [int(x) for x in input().split()]
	s = 0
	S = 0
	for j in range(0, 4):
		if a[j] % 2 == 0:
			s = s + 1
		else:
			S = S + 1
	if s == 4 or s == 3:
		print('Yes')
	elif a[0] > 0 and a[1] > 0 and (a[2] > 0):
		a[0] = a[0] - 1
		a[1] = a[1] - 1
		a[2] = a[2] - 1
		a[3] = a[3] + 3
		s = 0
		S = 0
		for j in range(0, 4):
			if a[j] % 2 == 0:
				s = s + 1
			else:
				S = S + 1
		if s == 4 or s == 3:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b, c, d) = map(int, input().split(' '))
	arr = [a % 2, b % 2, c % 2]
	zero = arr.count(0)
	one = arr.count(1)
	if one == 2:
		if a == 0 or b == 0 or c == 0:
			print('No')
		elif d % 2 == 0:
			print('No')
		else:
			print('Yes')
	elif one == 1:
		if d % 2 == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


production = True
import sys, math, collections, bisect, itertools, heapq, decimal, random, copy, re

def input(f=0, m=0):
	if m > 0:
		return [input(f) for i in range(m)]
	else:
		l = sys.stdin.readline()[:-1]
		if f >= 10:
			u = False
			f = int(str(f)[-1])
		else:
			u = True
		if f == 0:
			p = [l]
		elif f == 1:
			p = list(map(int, l.split()))
		elif f == 2:
			p = list(map(float, l.split()))
		elif f == 3:
			p = list(l)
		elif f == 4:
			p = list(map(int, list(l)))
		elif f == 5:
			p = l.split()
		return p if u else p[0]

def out(l, f=0, n=True):
	if f == 0:
		p = str(l)
	elif f == 1:
		p = ' '.join(map(str, l))
	elif f == 2:
		p = '\n'.join(map(str, l))
	elif f == 3:
		p = ''.join(map(str, l))
	print(p, end='\n' if n else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)

def mapl(i, f=0):
	if f == 0:
		return list(map(int, i))
	elif f == 1:
		return list(map(str, i))
	elif f == 2:
		return list(map(list, i))

def solve():
	(r, g, b, w) = input(1)
	if r + g + b + w == 0:
		out('Yes')
		return
	y = 0
	for i in (r, g, b, w):
		if i & 1:
			y += 1
	if y < 2:
		out('Yes')
		return
	if r and g and b:
		r -= 1
		g -= 1
		b -= 1
		w += 3
	y = 0
	for i in (r, g, b, w):
		if i & 1:
			y += 1
	if y < 2:
		out('Yes')
		return
	else:
		out('No')
	return
for i in range(input(11)):
	solve()


from collections import defaultdict
import copy

def ii():
	return int(input())

def si():
	return input()

def li():
	return list(map(int, input().split()))

def mi():
	return map(int, input().split())
t = ii()
for _ in range(t):
	arr = li()
	count = 0
	cnt = 0
	for i in arr:
		if i % 2 == 0:
			count += 1
		else:
			cnt += 1
	if arr[:3].count(0) < 1:
		if count >= 3 or count <= 1:
			print('YES')
		else:
			print('NO')
	elif cnt <= 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	arr = list(map(int, input().split()))
	count = 0
	for a in arr:
		if a % 2 == 1:
			count += 1
	if count > 1:
		if arr[0] >= 1 and arr[1] >= 1 and (arr[2] >= 1):
			arr[0] -= 1
			arr[1] -= 1
			arr[2] -= 1
			arr[3] += 3
		count = 0
		for a in arr:
			if a % 2 == 1:
				count += 1
		if count > 1:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	q = min(r, g, b)
	ct = sorted([r, g, b, w], reverse=True)
	if q >= 0:
		div = 0
		for i in ct:
			div += i % 2
		if div <= 1:
			print('YES')
		elif q == 0:
			print('NO')
		else:
			div = 0
			ct = sorted([r - 1, g - 1, b - 1, w + 1], reverse=True)
			for i in ct:
				div += i % 2
			if div <= 1:
				print('YES')
			else:
				print('NO')


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	return False
for _ in range(int(input())):
	arr = getList()
	odd = 0
	for i in arr:
		if i & 1:
			odd += 1
	if odd <= 1:
		print('YES')
	elif 0 not in arr[:3]:
		arr[0] -= 1
		arr[1] -= 1
		arr[2] -= 1
		arr[3] += 3
		odd = 0
		for i in arr:
			if i & 1:
				odd += 1
		if odd <= 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for i in range(int(input())):
	r = [int(i) for i in input().split()]
	if 0 in r[:3]:
		if r[0] % 2 + r[1] % 2 + r[2] % 2 + r[3] % 2 <= 1:
			print('YES')
		else:
			print('NO')
	elif r[0] % 2 + r[1] % 2 + r[2] % 2 + r[3] % 2 == 2:
		print('NO')
	else:
		print('YES')


for test in range(int(input())):
	l = list(map(int, input().strip().split(' ')))
	flag = 0
	j = 0
	while l[0] != -1 and l[1] != -1 and (l[2] != -1) and (j < 2):
		odds = 0
		even = 0
		for i in range(len(l)):
			if l[i] % 2 == 0:
				even += 1
			else:
				odds += 1
		if odds == 1 or odds == 0:
			print('Yes')
			flag = 1
			break
		l[0] -= 1
		l[1] -= 1
		l[2] -= 1
		l[3] += 3
		j += 1
	if flag == 0:
		print('No')


from sys import stdin

def readline():
	return stdin.readline()
tests = int(readline())

def solve(r, g, b, w):
	m = min(r, g, b)
	m1 = m - 1 if m > 2 else 0
	while m1 <= m:
		r1 = r - m1
		g1 = g - m1
		b1 = b - m1
		w1 = w + 3 * m1
		m1 += 1
		if g1 % 2 == 0 and b1 % 2 == 0 and (w1 % 2 == 0) or (r1 % 2 == 0 and b1 % 2 == 0 and (w1 % 2 == 0)) or (r1 % 2 == 0 and g1 % 2 == 0 and (w1 % 2 == 0)) or (r1 % 2 == 0 and g1 % 2 == 0 and (b1 % 2 == 0)):
			return 'Yes'
	return 'No'
for t in range(0, tests):
	(r, g, b, w) = list(map(int, readline().rstrip('\n').split(' ')))
	print(solve(r, g, b, w))


t = int(input())
for i in range(t):
	r = [int(x) for x in input().split()]
	odd = 0
	even = 0
	if r[0] != 0 and r[1] != 0 and (r[2] != 0):
		for i in r:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd == 2 and even == 2:
			print('No')
		else:
			print('Yes')
	else:
		for i in r:
			if i % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd == 1 or odd == 0:
			print('Yes')
		else:
			print('No')


def find_number_even_element(list_num):
	num_even_element = 0
	num_odd_element = 0
	for i in list_num:
		if i % 2 == 0:
			num_even_element += 1
		else:
			num_odd_element += 1
	return (num_even_element, num_odd_element)

def solve_palindrome_problem(list_num):
	if len(list_num) == 4:
		min_num = min(list_num[:3])
		for i in range(min_num + 1):
			(num_even, num_odd) = find_number_even_element([list_num[0] - i, list_num[1] - i, list_num[2] - i, list_num[3] + i * 3])
			if num_odd <= 1:
				return 'YES'
			if i == 2:
				break
	return 'NO'
n = int(input().strip())
for i in range(n):
	try_time = input().strip().split(' ')
	try_time = [int(i) for i in try_time]
	result = solve_palindrome_problem(try_time)
	print(result)


for _ in range(int(input())):
	a = list(map(int, input().split()))
	t = sum([x & 1 for x in a[:3]])
	if t & 1:
		if t == 3:
			print('Yes')
		elif a[-1] & 1:
			print('No')
		else:
			print('Yes')
	elif t == 0:
		print('Yes')
	elif a[-1] & 1 and min(a[:3]) != 0:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	(r, g, b, w) = map(int, input().split())
	ans = 'NO'
	k = 0
	if r % 2 != 0:
		k += 1
	if g % 2 != 0:
		k += 1
	if b % 2 != 0:
		k += 1
	if w % 2 != 0:
		k += 1
	if k == 0 or k == 1 or k == 4:
		ans = 'Yes'
	elif k == 3:
		if r != 0 and g != 0 and (b != 0):
			ans = 'Yes'
	print(ans)


for _ in range(int(input())):
	li = list(map(int, input().split()))
	out = 0
	for i in li:
		if i % 2:
			out += 1
	if 0 in li[:3] and out > 1:
		print('No')
	elif out == 2:
		print('No')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if r == b == g:
		print('YES')
		continue
	if r == 0 and b != 0 and (g != 0):
		if b % 2 == 0 and g % 2 == 0:
			print('YES')
		else:
			print('NO')
		continue
	if g == 0 and b != 0 and (r != 0):
		if b % 2 == 0 and r % 2 == 0:
			print('YES')
		else:
			print('NO')
		continue
	if b == 0 and r != 0 and (g != 0):
		if r % 2 == 0 and g % 2 == 0:
			print('YES')
		else:
			print('NO')
		continue
	x = min(r, g, b)
	if (r - x) % 2 == 0 and (b - x) % 2 == 0 and ((g - x) % 2 == 0):
		print('YES')
		continue
	if r == 0 and b == 0 and (g % 2 == 0):
		print('YES')
		continue
	if r == 0 and b % 2 == 0 and (g == 0):
		print('YES')
		continue
	if r % 2 == 0 and b == 0 and (g == 0):
		print('YES')
		continue
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
		print('YES')
		continue
	if r % 2 == 0 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 1):
		print('YES')
		continue
	if r % 2 == 1 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 1):
		print('YES')
		continue
	if r % 2 == 1 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 1):
		print('YES')
		continue
	if r % 2 == 1 and g % 2 == 1 and (b % 2 == 1):
		print('YES')
		continue
	if r % 2 == 1 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 0):
		print('YES')
		continue
	if r % 2 == 0 and b % 2 == 1 and (g % 2 == 0) and (w % 2 == 0):
		print('YES')
		continue
	if r % 2 == 0 and b % 2 == 0 and (g % 2 == 1) and (w % 2 == 0):
		print('YES')
		continue
	if r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 1):
		print('YES')
		continue
	print('NO')


import sys
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : sys.stdin.readline().strip().split()
ri = lambda : int(sys.stdin.readline().strip())
rs = lambda : sys.stdin.readline().strip()
from collections import defaultdict as df
import random
from queue import PriorityQueue as pq
from math import ceil
t = ri()
for _ in range(t):
	l = RI()
	if l[0] == 0 or l[1] == 0 or l[2] == 0:
		e = 0
		o = 0
		for i in l:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if e == 3 or e == 4:
			print('Yes')
		else:
			print('No')
	else:
		e = 0
		o = 0
		for i in l:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if e == 2:
			print('No')
		else:
			print('Yes')


t = int(input())
for i in range(t):
	k = list(input().split())
	r = int(k[0])
	g = int(k[1])
	b = int(k[2])
	w = int(k[3])
	temp = 0
	if r % 2 == 0:
		temp += 1
	if g % 2 == 0:
		temp += 1
	if b % 2 == 0:
		temp += 1
	if w % 2 == 0:
		temp += 1
	if temp == 3 or temp == 4:
		print('Yes')
	elif temp == 1:
		if g > 0 and r > 0 and (b > 0):
			print('Yes')
		else:
			print('No')
	elif temp == 0:
		if g > 0 and r > 0 and (b > 0):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


test = int(input())
i = 1
while i <= test:
	[r, g, b, w] = list(map(int, input().split()))
	odd = 0
	even = 4
	if r % 2 != 0:
		odd += 1
		even -= 1
	if g % 2 != 0:
		odd += 1
		even -= 1
	if b % 2 != 0:
		odd += 1
		even -= 1
	if w % 2 != 0:
		odd += 1
		even -= 1
	if odd == 2 and even == 2:
		print('No')
	elif odd == 3 and even == 1 and (r == 0 or g == 0 or b == 0):
		print('No')
	else:
		print('Yes')
	i += 1


def checker(R, G, B, W):
	return False if R % 2 + G % 2 + B % 2 + W % 2 > 1 else True
for _ in range(int(input())):
	(r, g, b, w) = [int(i) for i in input().split()]
	print('Yes' if checker(r, g, b, w) or (r > 0 and g > 0 and (b > 0) and checker(r - 1, g - 1, b - 1, w + 1)) else 'No')


import sys
input = sys.stdin.readline

def main(lst):
	odds = 0
	for i in lst:
		if i % 2:
			odds += 1
	minn = min(lst[:3])
	if minn >= 1:
		for i in range(3):
			lst[i] -= 1
		lst[3] += 3
	odds1 = 0
	for i in lst:
		if i % 2:
			odds1 += 1
	if odds1 > 1 and odds > 1:
		return 'No'
	else:
		return 'Yes'
for _ in range(int(input())):
	lst = list(map(int, input().split()))
	print(main(lst))


def solve(r, g, b, w):
	n_odds = 0
	n_evens = 0
	if r % 2 == 0:
		n_evens += 1
	if g % 2 == 0:
		n_evens += 1
	if b % 2 == 0:
		n_evens += 1
	if w % 2 == 0:
		n_evens += 1
	if n_evens == 1 and (r == 0 or g == 0 or b == 0):
		print('NO')
		return
	if n_evens != 2:
		print('YES')
		return
	else:
		print('NO')
		return
t = int(input())
for test in range(t):
	(r, g, b, w) = map(int, input().split())
	solve(r, g, b, w)


import math
import sys
import itertools
import random
import bisect
import heapq
import collections

def lcm(x, y):
	return x * y // math.gcd(x, y)

def hcf(x, y):
	return math.gcd(x, y)

def primes(n):
	prime = [True for _ in range(0, n + 1)]
	res = []
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[p] = False
		p += 1
	for i in range(0, n + 1):
		if prime[i] == True:
			res.append(i)
	return res

def primeFactors(n):
	res = []
	while n % 2 == 0:
		res.append(2)
		n //= 2
	for i in range(3, math.sqrt(n) + 1, 2):
		while n % i == 0:
			res.append(i)
			n //= i
	if n > 2:
		res.append(n)
	return res
for _ in range(0, int(input())):
	(r, g, b, w) = map(int, input().strip().split())
	even = 0
	odd = 0
	zer = 0
	res = []
	for k in [r, g, b, w]:
		if k == 0:
			res.append(0)
			continue
		if k % 2 == 0:
			res.append(1)
		else:
			res.append(-1)
	if res.count(-1) < 2:
		print('Yes')
	elif r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		res = []
		for k in [r, g, b, w]:
			if k == 0:
				res.append(0)
				continue
			if k % 2 == 0:
				res.append(1)
			else:
				res.append(-1)
		if res.count(-1) < 2:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	(a, b, c, d) = MI()
	boo = False
	for i in range(5):
		l = [a % 2, b % 2, c % 2, d % 2]
		x = l.count(1)
		y = l.count(0)
		if x < 2:
			boo = True
		elif a > 0 and b > 0 and (c > 0):
			a -= 1
			b -= 1
			c -= 1
			d += 3
		else:
			break
	print('Yes' if boo else 'No')


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def modefiedSieve():
	mx = 10 ** 7 + 1
	sieve = [-1] * mx
	for i in range(2, mx):
		if sieve[i] == -1:
			sieve[i] = i
			for j in range(i * i, mx, i):
				if sieve[j] == -1:
					sieve[j] = i
	return sieve

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def maxSubArraySum(a, size):
	maxint = 10 ** 10
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def solve():
	lis = list_input()
	n = 4
	even = 0
	for i in lis:
		if i % 2 == 0 and i != 0:
			even += 1
		if i == 0:
			n -= 1
	if even == n or len(set(lis)) == 1:
		print('YES')
		return
	odd = n - even
	if odd == n and n == 1:
		print('YES')
		return
	if 0 in lis[:3]:
		if odd > even:
			print('NO')
		else:
			print('YES')
	else:
		if even > odd:
			print('YES')
			return
		for i in range(3):
			if lis[i] > 0:
				lis[i] -= 1
				lis[-1] += 1
		even = 0
		n = 4
		for i in lis:
			if i % 2 == 0 and i != 0:
				even += 1
			if i == 0:
				n -= 1
		odd = n - even
		if odd == n and n == 1:
			print('YES')
			return
		if even > odd:
			print('YES')
			return
		print('NO')
		return
t = 1
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	odd_count = 0
	odd_count += int(r % 2 == 1)
	odd_count += int(g % 2 == 1)
	odd_count += int(b % 2 == 1)
	odd_count += int(w % 2 == 1)
	if odd_count <= 1:
		print('Yes')
		continue
	min_ = min(r, g, b)
	if min_ == 0:
		print('No')
		continue
	r -= 1
	g -= 1
	b -= 1
	w += 3
	odd_count = 0
	odd_count += int(r % 2 == 1)
	odd_count += int(g % 2 == 1)
	odd_count += int(b % 2 == 1)
	odd_count += int(w % 2 == 1)
	if odd_count <= 1:
		print('Yes')
		continue
	print('No')


def Run():
	(r, g, b, w) = [int(x) for x in input().split()]
	odds = 0
	if r % 2:
		odds += 1
	if g % 2:
		odds += 1
	if b % 2:
		odds += 1
	if w % 2:
		odds += 1
	if odds <= 1:
		print('Yes')
		return
	if r >= 1 and g >= 1 and (b >= 1):
		odds = 0
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if r % 2:
			odds += 1
		if g % 2:
			odds += 1
		if b % 2:
			odds += 1
		if w % 2:
			odds += 1
		if odds <= 1:
			print('Yes')
		else:
			print('No')
		return
	else:
		print('No')
		return
T = int(input())
for x in range(0, T):
	Run()


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	a = [int(x) for x in input().split()]
	cnt = 0
	flag = 0
	for x in a:
		if x % 2 == 0:
			cnt += 1
	if cnt >= 3:
		print('YES')
		continue
	for x in range(3):
		if a[x] == 0:
			flag = 1
			break
		a[x] -= 1
	if flag == 1:
		print('NO')
		continue
	a[-1] += 1
	cnt = 0
	for x in a:
		if x % 2 == 0:
			cnt += 1
	if cnt >= 3:
		print('YES')
	else:
		print('NO')


T = int(input())
while T:
	T -= 1
	(R, G, B, W) = list(map(int, input().split()))
	oddcount = 0
	if R % 2 == 1:
		oddcount += 1
	if G % 2 == 1:
		oddcount += 1
	if B % 2 == 1:
		oddcount += 1
	if W % 2 == 1:
		oddcount += 1
	if oddcount == 0 or oddcount == 1:
		print('Yes')
	elif oddcount == 2:
		print('No')
	elif oddcount == 3:
		if R == 0 or G == 0 or B == 0:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


from sys import stdout, stdin
from collections import defaultdict
t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	z = 0
	for i in range(3):
		if l[i] == 0:
			z += 1
	k = 0
	if l[3] % 2 != 0:
		k += 1
	if l[0] % 2 != 0:
		k += 1
	if l[1] % 2 != 0:
		k += 1
	if l[2] % 2 != 0:
		k += 1
	if k == 2:
		print('No')
	if k == 1:
		print('Yes')
	if k == 4:
		print('Yes')
	if k == 3:
		if z == 1:
			print('No')
		else:
			print('Yes')
	if k == 0:
		print('Yes')


n = input()

def fun():
	a = 0
	b = 0
	c = 0
	d = 0
	(a, b, c, d) = map(int, input().split())
	if a % 2 + b % 2 + c % 2 + d % 2 <= 1:
		return 'Yes'
	elif a != 0 and b != 0 and (c != 0):
		a -= 1
		b -= 1
		c -= 1
		d += 3
		if a % 2 + b % 2 + c % 2 + d % 2 <= 1:
			return 'Yes'
	return 'No'
for i in range(int(n)):
	print(fun())


for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r == 0 or g == 0 or b == 0:
		if r % 2 + g % 2 + b % 2 + w % 2 > 1:
			print('No')
		else:
			print('Yes')
	elif r % 2 + g % 2 + b % 2 + w % 2 == 2:
		print('No')
	else:
		print('Yes')


t = int(input())

def noOfOdds(r, g, b):
	count = 0
	if r % 2 != 0:
		count += 1
	if g % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	return count

def solve(r, g, b, w):
	x = noOfOdds(r, g, b)
	if x == 0:
		return 'Yes'
	if r == 0 or g == 0 or b == 0:
		if x == 1 and w % 2 != 0:
			return 'No'
		if x == 1 and w % 2 == 0:
			return 'Yes'
		if x == 2:
			return 'No'
	if w % 2 == 0:
		if x == 1:
			return 'Yes'
		elif x == 2:
			return 'No'
		else:
			return 'Yes'
	elif x == 1:
		return 'No'
	elif x == 2:
		return 'Yes'
	else:
		return 'Yes'
while t > 0:
	(r, g, b, w) = map(int, input().split())
	x = min(r, min(g, b))
	ans = solve(r, g, b, w)
	print(ans)
	t -= 1


T = int(input())
for _ in range(T):
	(a, b, c, d) = map(int, input().split())
	odd = 0
	if a % 2 == 1:
		odd += 1
	if b % 2 == 1:
		odd += 1
	if c % 2 == 1:
		odd += 1
	if a == 0 or b == 0 or c == 0:
		if d % 2 == 0 and odd <= 1:
			print('YES')
		elif d % 2 == 1:
			if odd > 0:
				print('NO')
			else:
				print('YES')
		else:
			print('NO')
	elif d % 2 == 1:
		if odd == 1:
			print('NO')
		else:
			print('YES')
	elif odd == 2:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	a = list(map(int, input().split()))
	if 0 in a[:3]:
		odd = 0
		for i in a:
			odd += i & 1
		if odd > 1:
			print('No')
		else:
			print('Yes')
	else:
		odd = 0
		for i in a:
			odd += i & 1
		if odd != 2:
			print('Yes')
		else:
			print('No')


from sys import stdin
for _ in range(int(input())):
	(a, b, c, d) = map(int, stdin.readline().rstrip().split(' '))
	z = [a, b, c, d]
	co = 0
	for i in range(4):
		if z[i] % 2:
			co += 1
	if co <= 1:
		print('Yes')
	else:
		if a > 0 and b > 0 and (c > 0):
			a -= 1
			b -= 1
			c -= 1
			d += 3
		z = [a, b, c, d]
		co = 0
		for i in range(4):
			if z[i] % 2:
				co += 1
		if co <= 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	mask = 0
	(rr, gg, bb, ww) = (False, False, False, False)
	o = 0
	if r & 1:
		rr = True
		o += 1
	if g & 1:
		gg = True
		o += 1
	if b & 1:
		bb = True
		o += 1
	if w & 1:
		ww = True
		o += 1
	if o == 2:
		print('No')
	elif o == 3:
		if not ww and (rr and gg and bb):
			print('Yes')
		elif (ww and (not (rr and gg and bb))) and min(r, g, b) != 0:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


def check(arr):
	(co, ce) = (0, 0)
	for i in arr:
		if i % 2 == 0:
			ce += 1
		else:
			co += 1
	return [co, ce]
for _ in range(int(input())):
	arr = list((int(i) for i in input().split()))
	if all((i % 2 == 0 for i in arr)):
		print('Yes')
	elif all((i == 0 for i in arr)):
		print('Yes')
	elif all((i == 0 for i in arr[:3])):
		print('Yes')
	else:
		(co, ce) = check(arr)
		if co <= 1:
			print('Yes')
		elif any((i == 0 for i in arr[:3])):
			print('No')
		else:
			(co, ce) = check(arr)
			if co == 1 and ce == 3:
				print('Yes')
			else:
				(co, ce) = check(arr[:3])
				if co == 3:
					print('Yes')
				elif co == 2 and arr[3] % 2 != 0:
					print('Yes')
				else:
					print('No')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	e = (a % 2 == 1) + (b % 2 == 1) + (c % 2 == 1) + (d % 2 == 1)
	if e <= 1:
		print('Yes')
		continue
	if a == 0 or b == 0 or c == 0:
		print('No')
		continue
	a -= 1
	b -= 1
	c -= 1
	d += 3
	e = (a % 2 == 1) + (b % 2 == 1) + (c % 2 == 1) + (d % 2 == 1)
	if e <= 1:
		print('Yes')
		continue
	print('No')


for t in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	mini = min(r, g, b)
	cur = [r - mini, g - mini, b - mini, w + 3 * mini]
	(even, odd) = ([], [])
	for el in cur:
		if el % 2 == 0:
			even.append(el)
		else:
			odd.append(el)
	if mini == 0:
		if len(even) >= 3:
			print('Yes')
		else:
			print('No')
	elif len(even) >= 3 or len(odd) == 3:
		print('Yes')
	else:
		print('No')


def isodd(n):
	return True if n % 2 else False
for _ in ' ' * int(input()):
	cake = dict(zip(('r', 'g', 'b', 'w'), tuple(map(int, input().split(' ')))))
	dg = tuple(map(lambda x: x % 2, tuple(cake.values())))
	ret = 'No'
	if isodd(sum(cake.values())):
		if sum(dg) == 3 and (cake['w'] == 0 or 0 not in cake.values()) or sum(dg) == 1:
			ret = 'Yes'
	elif sum(dg) == 4 or sum(dg) == 0:
		ret = 'Yes'
	if ret == 'Yes':
		print(ret)
	else:
		print(ret)


def solve():
	(r, g, b, w) = map(int, input().split())
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		return 'Yes'
	if min(r, g, b) >= 1:
		(r, g, b, w) = (r - 1, g - 1, b - 1, w + 3)
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			return 'Yes'
	return 'No'
TC = int(input())
for tc in range(TC):
	print(solve())


T = int(input())
for case in range(T):
	(r, g, b, w) = [int(x) for x in input().split()]
	even = []
	even_count = 0
	if r % 2 == 0:
		even.append(r)
		even_count += 1
	if g % 2 == 0:
		even.append(g)
		even_count += 1
	if b % 2 == 0:
		even.append(b)
		even_count += 1
	if even_count == 3 or even_count == 0:
		print('YES')
		continue
	if even_count == 2 and w % 2 == 0:
		print('YES')
		continue
	if even_count == 1 and even[0] != 0 and (w % 2 != 0):
		print('YES')
		continue
	print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for ii in range(t):
	(r, g, b, w) = map(int, input().split())
	(odd, even) = (0, 0)
	zero = 0
	for i in [r, g, b, w]:
		if i == 0:
			zero += 1
		elif i & 1:
			odd += 1
		elif i % 2 == 0:
			even += 1
	if zero == 4:
		print('Yes')
	if zero == 1:
		if w == 0:
			if odd == 2:
				print('No')
			else:
				print('Yes')
		elif odd <= 1:
			print('Yes')
		else:
			print('No')
	if zero == 2:
		if odd <= 1:
			print('Yes')
		else:
			print('No')
	if zero == 3:
		print('Yes')
	if zero == 0:
		if odd > 2 or even > 2:
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	(a, b, c, d) = list(map(int, input().split()))
	if a % 2 + b % 2 + c % 2 + d % 2 <= 1 or (a >= 1 and b >= 1 and (c >= 1) and ((a - 1) % 2 + (b - 1) % 2 + (c - 1) % 2 + (d + 3) % 2 <= 1)):
		print('YES')
	else:
		print('NO')


def count_even(r, g, b, w):
	count = 0
	if r % 2 == 0:
		count += 1
	if g % 2 == 0:
		count += 1
	if b % 2 == 0:
		count += 1
	if w % 2 == 0:
		count += 1
	return count
for I in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if count_even(r, g, b, w) > 2:
		print('Yes')
	else:
		if r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 3
		if count_even(r, g, b, w) > 2:
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	x = [r, g, b, w]
	c = 0
	for i in range(len(x)):
		if x[i] % 2 == 0:
			pass
		else:
			c += 1
	if r == 0 or g == 0 or b == 0:
		if c == 0 or c == 1:
			print('Yes')
		else:
			print('No')
	elif c == 2:
		print('No')
	else:
		print('Yes')


a = int(input())
for i in range(0, a):
	(r, g, b, w) = map(int, input().split())
	if w % 2 == 0:
		ec = r % 2 + g % 2 + b % 2
		if ec == 3:
			if r == 0 or g == 0 or b == 0:
				print('NO')
			else:
				print('YES')
		elif ec == 2:
			print('NO')
		elif ec == 1:
			print('YES')
		else:
			print('YES')
	else:
		ec = r % 2 + g % 2 + b % 2
		if ec == 0:
			print('YES')
		if ec == 1:
			print('NO')
		if ec == 2:
			if r == 0 or g == 0 or b == 0:
				print('NO')
			else:
				print('YES')
		if ec == 3:
			if r == 0 or g == 0 or b == 0:
				print('NO')
			else:
				print('YES')


t = int(input())
while t:
	balls = list(map(int, input().split()))
	evencnt = 0
	zeroball = False
	for ball in balls:
		if ball % 2 == 0:
			evencnt += 1
			if ball == 0:
				zeroball = True
	if evencnt == 2:
		print('No')
	elif evencnt == 1:
		if balls[3] % 2 != 0 and zeroball:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')
	t -= 1


T = int(input())

def ok(r, g, b, w):
	if min(r, g, b, w) < 0:
		return False
	odds = [x for x in [r, g, b, w] if x % 2 == 1]
	return len(odds) <= 1

def ans(r, g, b, w):
	for _ in range(200):
		if ok(r, g, b, w):
			return True
		r -= 1
		g -= 1
		b -= 1
		w += 1
	return False
for t in range(T):
	(r, g, b, w) = input().split()
	r = int(r)
	g = int(g)
	b = int(b)
	w = int(w)
	if ans(r, g, b, w):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	ne_chet = (r % 2 + g % 2 + b % 2 + w % 2) % 2
	if ne_chet:
		fl = 0
		if r % 2 == 1:
			fl += 1
		if g % 2 == 1:
			fl += 1
		if b % 2 == 1:
			fl += 1
		if w % 2 == 1:
			fl += 1
		if fl == 1:
			print('Yes')
		elif r == 0 or g == 0 or b == 0:
			print('No')
		else:
			print('Yes')
	elif r % 2 == g % 2 == b % 2 == w % 2:
		print('Yes')
	else:
		print('No')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def main():
	t = I()
	rr = []
	for _ in range(t):
		a = LI()
		r = False
		m = min(a[:3])
		if m == 0:
			k = 0
			for c in a:
				if c % 2 == 1:
					k += 1
			r = k < 2
		else:
			k = 0
			for c in a:
				if c % 2 == 1:
					k += 1
			r = k != 2
		rr.append(IF(r, 'Yes', 'No'))
	return JA(rr, '\n')
print(main())


import sys
input = sys.stdin.readline

def solve():
	(a, b, c, d) = map(int, input().split())
	odd_count = 0
	for i in [a, b, c, d]:
		if i % 2 == 1:
			odd_count += 1
	if odd_count <= 1:
		print('YES')
		return
	if a == 0 or b == 0 or c == 0:
		print('NO')
		return
	a -= 1
	b -= 1
	c -= 1
	d += 3
	odd_count = 0
	for i in [a, b, c, d]:
		if i % 2 == 1:
			odd_count += 1
	if odd_count <= 1:
		print('YES')
		return
	print('NO')
	return
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	c = 0
	x = list(map(int, input().split()))
	for i in x:
		if i % 2 != 0:
			c += 1
	if c <= 1:
		print('Yes')
		continue
	c = 0
	mi = min(x[:3])
	for i in range(3):
		x[i] -= mi
	x[3] += 3 * mi
	for i in x:
		if i % 2 != 0:
			c += 1
	if c <= 1:
		print('Yes')
		continue
	c = 0
	mi = max(0, mi - 1)
	for i in range(3):
		x[i] -= mi
	x[3] += 3 * mi
	for i in x:
		if i % 2 != 0:
			c += 1
	if c <= 1:
		print('Yes')
		continue
	print('No')


import os
import heapq
import sys, threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10 ** 5)
from io import BytesIO, IOBase

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def inar():
	return [int(k) for k in input().split()]

def lcm(num1, num2):
	return num1 * num2 // gcd(num1, num2)

def main():
	t = int(input())
	for _ in range(t):
		arr = inar()
		odd = 0
		even = 0
		w = arr[3]
		for i in range(4):
			if arr[i] % 2 == 0:
				even += 1
			else:
				odd += 1
		if even == 4:
			print('YES')
		elif odd == 1:
			print('YES')
		elif odd == 4:
			print('YES')
		elif arr[0] > 0 and arr[1] > 0 and (arr[2] > 0) and (odd - 1 == 2) and (w % 2 != 0):
			print('YES')
		elif arr[0] > 0 and arr[1] > 0 and (arr[2] > 0) and (odd == 3) and (w % 2 == 0):
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for a in range(t):
	(r, g, b, w) = map(int, input().split())
	flag = False
	if (r + g + b + w) % 2 == 0:
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
			flag = True
		else:
			while r > 0 and g > 0 and (b > 0):
				r -= 1
				g -= 1
				b -= 1
				w += 3
				if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
					flag = True
				break
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 1) or (r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0)) or (r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0)) or (r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0)):
		flag = True
	else:
		while r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 3
			if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 1) or (r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0)) or (r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0)) or (r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0)):
				flag = True
			break
	if flag:
		print('Yes')
	else:
		print('No')


def solve():
	(r, g, b, w) = map(int, input().split())
	if min([r, g, b]) == 0:
		if r % 2 + g % 2 + b % 2 + w % 2 > 1:
			print('No')
		else:
			print('Yes')
	else:
		(r2, g2, b2, w2) = (r - 1, g - 1, b - 1, w + 3)
		if r2 % 2 + g2 % 2 + b2 % 2 + w2 % 2 > 1 and r % 2 + g % 2 + b % 2 + w % 2 > 1:
			print('No')
		else:
			print('Yes')
[solve() for x in range(int(input()))]


n = int(input())
for x in range(n):
	(r, g, b, w) = map(int, input().split())
	cnt = 0
	if r % 2 == 0:
		cnt = cnt + 1
	if g % 2 == 0:
		cnt = cnt + 1
	if b % 2 == 0:
		cnt = cnt + 1
	if w % 2 == 0:
		cnt = cnt + 1
	if cnt >= 3 or cnt == 0:
		print('Yes')
	elif cnt == 1 and r * g * b > 0:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	count = 0
	if r % 2 != 0:
		count += 1
	if g % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	if w % 2 != 0:
		count += 1
	if count <= 1:
		print('Yes')
	else:
		if r == 0 or g == 0 or b == 0:
			print('No')
			continue
		r -= 1
		g -= 1
		b -= 1
		w += 3
		count = 0
		if r % 2 != 0:
			count += 1
		if g % 2 != 0:
			count += 1
		if b % 2 != 0:
			count += 1
		if w % 2 != 0:
			count += 1
		if count <= 1:
			print('Yes')
		else:
			print('No')


import sys
input = sys.stdin.readline

def check_palin(ls):
	if ls.count(False) > 1:
		return 'No'
	else:
		return 'Yes'

def solve():
	(r, g, b, w) = map(int, input().split())
	odd_count = 0
	r_stat = True
	g_stat = True
	b_stat = True
	w_stat = True
	if r % 2 == 1:
		r_stat = False
	if g % 2 == 1:
		g_stat = False
	if b % 2 == 1:
		b_stat = False
	if w % 2 == 1:
		w_stat = False
	swap = {True: False, False: True}
	initial = [r_stat, g_stat, b_stat, w_stat]
	ans = []
	tmp_ans = check_palin(initial)
	ans.append(tmp_ans)
	if min(r, g, b) >= 1:
		moved = [swap[r_stat], swap[g_stat], swap[b_stat], swap[w_stat]]
		tmp_ans = check_palin(moved)
		ans.append(tmp_ans)
	if 'Yes' in ans:
		print('Yes')
	else:
		print('No')
T = int(input())
for _ in range(T):
	solve()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	mi = min(r, g, b)
	st = 0
	if w % 2 == 1:
		st = st + 1
	if r % 2 == 1:
		st = st + 1
	if g % 2 == 1:
		st = st + 1
	if b % 2 == 1:
		st = st + 1
	if st <= 1:
		print('Yes')
	elif st == 2:
		print('No')
	elif mi > 0:
		print('Yes')
	else:
		print('No')


MOD = 1000000007
from collections import defaultdict as dd, Counter, deque

def si():
	return input()

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def mi():
	return map(int, input().split())

def out(v):
	print(v)

def spout():
	print(v, end=' ')

def d2b(n):
	return bin(n).replace('0b', '')

def twod(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def vow():
	return ['a', 'e', 'i', 'o', 'u']

def let():
	return [chr(i) for i in range(97, 123)]

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ispow2(x):
	return x and (not x & x - 1)

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)
t = ii()
while t:
	t -= 1
	(r, g, b, w) = mi()
	odd = 0
	for i in [r, g, b, w]:
		if i % 2 == 1:
			odd += 1
	if odd <= 1:
		print('Yes')
	elif odd == 2:
		print('No')
	elif min(r, g, b) == 0:
		print('No')
	else:
		print('Yes')


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if min(a, b, c) == 0:
		if (a & 1) + (b & 1) + (c & 1) + (d & 1) <= 1:
			print('Yes')
		else:
			print('No')
	elif (a & 1) + (b & 1) + (c & 1) + (d & 1) != 2:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	a = [int(x) for x in input().split()]
	if sum(a) == 0:
		print('YES')
		continue
	if all(a[:3]):
		if sum([x % 2 != 0 for x in a]) in [0, 1, 3, 4]:
			print('YES')
		else:
			print('NO')
	elif sum([x % 2 != 0 for x in a]) in [0, 1]:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	p = [r % 2, g % 2, b % 2, w % 2]
	p.sort()
	if p == [0, 0, 0, 0] or p == [0, 0, 0, 1]:
		print('Yes')
		continue
	if p == [0, 0, 1, 1]:
		print('No')
		continue
	if r > 0 and g > 0 and (b > 0):
		print('Yes')
	else:
		print('No')


from collections import deque, defaultdict
t = int(input())
for _ in range(t):
	colors = list(map(int, input().split()))
	(r, g, b, w) = colors
	if r == 0 or g == 0 or b == 0:
		odd = even = 0
		for c in colors:
			if c % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd > 1:
			print('NO')
		else:
			print('YES')
	else:
		even = odd = 0
		for c in colors:
			if c % 2 == 0:
				even += 1
			else:
				odd += 1
		if even == 4 or odd == 4 or (odd == 3 and even == 1) or (even == 3 or odd == 1):
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	c = (r & 1) + (g & 1) + (b & 1) + (w & 1)
	if c <= 1:
		print('YEs')
		continue
	m = min(r, g, b)
	if m == 0:
		print('NO')
		continue
	r -= 1
	g -= 1
	b -= 1
	w += 3
	c = (r & 1) + (g & 1) + (b & 1) + (w & 1)
	if c <= 1:
		print('YES')
	else:
		print('No')


tc = int(input())
for _ in range(tc):
	(r, g, b, w) = map(int, input().split())
	sumAll = r + g + b + w
	if sumAll % 2 == 0:
		if r % 2 == 0 and b % 2 == 0 and (g % 2 == 0) and (w % 2 == 0):
			print('Yes')
		elif r % 2 != 0 and b % 2 != 0 and (g % 2 != 0) and (w % 2 != 0):
			print('Yes')
		else:
			print('No')
	else:
		oddcount = 0
		if r % 2 != 0:
			oddcount += 1
		if g % 2 != 0:
			oddcount += 1
		if b % 2 != 0:
			oddcount += 1
		if w % 2 != 0:
			oddcount += 1
		if oddcount == 1:
			print('Yes')
		elif r == 0 or g == 0 or b == 0:
			print('No')
		else:
			print('Yes')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	(r, g, b, w) = map(int, input().split())
	odd = 0
	even = 0
	for each in [r, g, b, w]:
		if each % 2:
			odd += 1
		else:
			even += 1
	if odd <= 1:
		print('Yes')
		continue
	m = min(r, g, b)
	odd = 0
	even = 0
	for each in [r - m, g - m, b - m, w + 3 * m]:
		if each % 2:
			odd += 1
		else:
			even += 1
	if odd <= 1:
		print('Yes')
		continue
	odd = 0
	even = 0
	if m <= 1:
		print('No')
		continue
	for each in [r - (m - 1), g - (m - 1), b - (m - 1), w + 3 * (m - 1)]:
		if each % 2:
			odd += 1
		else:
			even += 1
	if odd <= 1:
		print('Yes')
		continue
	print('No')


for i in range(int(input())):
	l = [int(x) for x in input().split()]
	cout = 0
	for i in l:
		if i % 2 == 0:
			cout += 1
	if cout > 2:
		print('Yes')
	elif cout == 2:
		print('No')
	elif l[0] != 0 and l[1] != 0 and (l[2] != 0):
		print('Yes')
	else:
		print('No')


t = int(input())

def main():
	balls = list(map(int, input().split()))
	odd = 0
	for b in balls:
		if b % 2 == 1:
			odd += 1
	if 0 in balls[:3]:
		if odd >= 2:
			return 'No'
	if odd == 2:
		return 'No'
	return 'Yes'
for i in range(t):
	print(main())


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
from decimal import Decimal
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	arr = l()
	cnt = 0
	for i in range(3):
		cnt += arr[i] % 2
	if cnt in [0, 3]:
		out('Yes')
		continue
	cnt = 0
	for i in range(4):
		cnt += arr[i] % 2
	if cnt <= 1:
		out('Yes')
		continue
	if arr[-1] & 1:
		cnt = 0
		for i in range(3):
			if arr[i] & 1:
				cnt += 1
		if cnt == 2 and min(arr[:3]) > 0:
			out('Yes')
		else:
			out('No')
		continue
	out('No')


f = int(input())
for q in range(f):
	(r, g, b, w) = map(int, input().split())
	s = r % 2 + g % 2 + b % 2 + w % 2
	if s == 2:
		print('No')
	elif s == 1:
		print('Yes')
	elif s == 4 or s == 0:
		print('Yes')
	elif r and g and b:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
input = lambda : stdin.readline().strip()
for _ in range(int(input())):
	(a, b, c, d) = list(map(int, input().split()))
	no = 0
	n0 = 0
	if a % 2 != 0:
		no += 1
	elif a == 0:
		n0 += 1
	if b % 2 != 0:
		no += 1
	elif b == 0:
		n0 += 1
	if c % 2 != 0:
		no += 1
	elif c == 0:
		n0 += 1
	if no == 0:
		print('Yes')
	elif no == 1 and d % 2 == 0:
		print('Yes')
	elif no == 2 and n0 == 0 and (d % 2 != 0):
		print('Yes')
	elif no == 3:
		print('Yes')
	else:
		print('No')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())

def solve(r, g, b, w):
	arr = [r & 1, g & 1, b & 1, w & 1]
	even = arr.count(0)
	odd = arr.count(1)
	if even == 4 or (odd == 1 and even == 3):
		return 1
	return 0
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	ans = 1
	if not solve(r, g, b, w):
		if r and g and b:
			r -= 1
			g -= 1
			b -= 1
			w += 3
			ans = solve(r, g, b, w)
		else:
			ans = 0
	if ans:
		print('Yes')
	else:
		print('No')


def ch(a):
	if a % 2:
		return 0
	return 1

def zer(a):
	if a == 0:
		return 1
	return 0

def solve():
	(r, g, b, w) = map(int, input().split())
	while r >= 0 and g >= 0 and (b >= 0):
		cht = ch(r) + ch(g) + ch(b)
		if cht == 0 or cht == 3:
			print('Yes')
			return
		if cht == 2 and ch(w):
			print('Yes')
			return
		if cht == 2 and (not ch(w)):
			break
		if cht == 1 and ch(w):
			break
		zero = zer(r) + zer(g) + zer(b)
		if cht == 1 and zero == 0 and (not ch(w)):
			print('Yes')
			return
		r -= 1
		g -= 1
		b -= 1
		w += 3
	print('No')
for _ in range(int(input())):
	solve()


def no(a, b, c, d):
	s = 0
	if a % 2 == 1:
		s += 1
	if b % 2 == 1:
		s += 1
	if c % 2 == 1:
		s += 1
	if d % 2 == 1:
		s += 1
	return s
tt = int(input())
while tt != 0:
	(r, g, b, w) = map(int, input().split())
	fl = 0
	for i in range(3):
		if no(r, g, b, w) <= 1:
			print('Yes')
			fl = 2
			break
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if r < 0 or g < 0 or b < 0:
			fl = 1
			break
	if fl != 2:
		print('No')
	tt -= 1


def solve(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		return True
	elif r >= 1 and g >= 1 and (b >= 1):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			return True
		else:
			return False
	else:
		return False
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	print('Yes' if solve(r, g, b, w) else 'No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	n = r + g + b + w
	parity = [0, 0]
	parity[r % 2] += 1
	parity[g % 2] += 1
	parity[b % 2] += 1
	parity[w % 2] += 1
	if r == 0 or g == 0 or b == 0:
		if n % 2 == 0:
			print('Yes' if parity[0] == 4 else 'No')
		else:
			print('Yes' if parity[0] == 3 else 'No')
	elif n % 2 == 0:
		print('Yes' if parity[0] == 0 or parity[0] == 4 else 'No')
	else:
		print('Yes' if parity[0] == 3 or parity[0] == 1 else 'No')


for _ in range(int(input())):
	(r, b, g, w) = tuple(map(int, input().split()))
	f = tuple(filter(lambda x: x % 2 != 0, (r, b, g, w)))
	if len(f) <= 1 or len(f) == 4:
		print('Yes')
	elif len(f) == 2:
		print('No')
	elif w % 2 == 0:
		print('Yes')
	elif all((t != 0 for t in (r, b, g))):
		print('Yes')
	else:
		print('No')


t = int(input())
for k in range(t):
	l = [int(p) for p in input().split()]
	s = sum(l)
	st = ''
	count = 0
	for i in range(len(l)):
		if l[i] == 0:
			count += 1
		if l[i] % 2 == 0:
			st += 'e'
		if l[i] % 2 == 1:
			st += 'o'
	if count == 3:
		print('Yes')
	if count >= 1 and count != 3 and (s % 2 == 0):
		if st == 'eeee':
			print('Yes')
		else:
			print('No')
	if count >= 1 and count != 3 and (s % 2 == 1):
		if st == 'oeee' or st == 'eoee' or st == 'eeoe' or (st == 'eeeo') or (st == 'oooe'):
			print('Yes')
		else:
			print('No')
	if count == 0 and s % 2 == 0:
		if st == 'eeee' or st == 'oooo':
			print('Yes')
		else:
			print('No')
	if count == 0 and s % 2 == 1:
		print('Yes')


import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		ar = inpt()
		od = 0
		w = ar[3]
		t = 10
		for i in ar:
			od += i % 2
		if od == 0 or od == 1:
			print('YES')
			continue
		ans = 'NO'
		while t:
			o = 0
			ok = True
			for i in range(3):
				if ar[i] == 0:
					ok = False
					break
				ar[i] -= 1
			if not ok:
				break
			ar[3] += 3
			for i in ar:
				o += i % 2
			if o == 0 or o == 1:
				ans = 'YES'
				break
			t -= 1
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
a = []
for i in range(t):
	a.append([])
	a[i] = [int(a[i]) for a[i] in input().split()]
	z = a[i][0] % 2 + a[i][1] % 2 + a[i][2] % 2 + a[i][3] % 2
	if z == 3:
		if a[i].count(0) == 1 and a[i][3] != 0:
			print('No')
		else:
			print('Yes')
	elif z == 1 or z == 4 or z == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	o = 0
	l = list(map(int, input().split()))
	if l[0] % 2 == 1:
		o += 1
	if l[1] % 2 == 1:
		o += 1
	if l[2] % 2 == 1:
		o += 1
	if l[3] % 2 == 1:
		o += 1
	if 1 >= o:
		print('Yes')
	elif o == 2:
		print('No')
	elif min(l[0], l[1], l[2]) > 0:
		print('Yes')
	else:
		print('No')
	t -= 1


def istrue(a, b, c, d):
	count = 4
	if a % 2 != 0:
		count -= 1
	if b % 2 != 0:
		count -= 1
	if c % 2 != 0:
		count -= 1
	if d % 2 != 0:
		count -= 1
	if count >= 3:
		return True
	else:
		return False
for testcases in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	flag = 0
	n = 0
	while r >= 0 and b >= 0 and (g >= 0) and (n < 3):
		n += 1
		if istrue(r, g, b, w):
			flag = 1
			break
		else:
			r -= 1
			b -= 1
			g -= 1
			w += 3
	if flag == 0:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	a = list(map(int, input().split()))
	b = 0
	for i in range(len(a)):
		if a[i] % 2 != 0:
			b += 1
	if b == 4:
		print('Yes')
	elif b == 3 and a[0] != 0 and (a[1] != 0) and (a[2] != 0):
		print('Yes')
	elif b == 0:
		print('Yes')
	elif b == 1:
		print('Yes')
	else:
		print('No')


import math
import os
import random
import re
import sys
from collections import defaultdict, Counter, deque
import heapq
from functools import lru_cache
from itertools import accumulate, chain, combinations, permutations, groupby, zip_longest
from math import floor, ceil, sqrt

def solve(r, g, b, w):
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
		return True
	elif r % 2 + g % 2 + b % 2 == 1:
		return w % 2 == 0
	elif r % 2 + g % 2 + b % 2 == 2:
		if w % 2 == 1:
			return min([r, g, b]) > 0
		else:
			return False
	else:
		return min([r, g, b]) > 0
t = int(input())
results = []
for _ in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	results.append(solve(r, g, b, w))
for res in results:
	if res:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for xyz in range(0, int(input())):
	l = list(map(int, input().split()))
	oc = zc = ec = 0
	for i in range(0, 3):
		if l[i] == 0:
			zc += 1
		elif l[i] % 2 == 0:
			ec += 1
		else:
			oc += 1
	if l[-1] % 2 == 0:
		ec += 1
	else:
		oc += 1
	if zc == 0:
		if oc == 2 and ec == 2:
			print('No')
		else:
			print('Yes')
	elif zc == 1:
		if oc >= 2:
			print('No')
		else:
			print('Yes')
	elif zc == 2:
		if oc == 2:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


for _ in range(int(input())):
	(r, g, b, w) = [int(x) for x in input().split()]
	odd = 0
	for i in [r, g, b, w]:
		if i % 2 != 0:
			odd += 1
	if odd <= 1:
		print('YES')
		continue
	odd = 0
	if r == 0 or g == 0 or b == 0:
		print('NO')
		continue
	for i in [r - 1, g - 1, b - 1, w + 3]:
		if i % 2 != 0:
			odd += 1
	if odd <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	lis = [int(i) for i in input().split()]
	odd_qtd = sum([i & 1 for i in lis])
	if odd_qtd in [4, 0, 1]:
		print('Yes')
	elif odd_qtd == 3:
		if all([i > 0 for i in lis[:-1]]):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from sys import stdin
for _ in range(int(stdin.readline())):
	(r, g, b, w) = list(map(int, stdin.readline().split()))
	res = 'No'
	if sum([r % 2, g % 2, b % 2, w % 2]) <= 1:
		res = 'Yes'
	elif r > 0 and g > 0 and (b > 0):
		rr = r - 1
		gg = g - 1
		bb = b - 1
		ww = w + 3
		if sum([rr % 2, gg % 2, bb % 2, ww % 2]) <= 1:
			res = 'Yes'
	print(res)


import math
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	e = 0
	if r % 2 == 0:
		e += 1
	if g % 2 == 0:
		e += 1
	if b % 2 == 0:
		e += 1
	if w % 2 == 0:
		e += 1
	if e >= 3:
		print('Yes')
	elif r * b * g != 0:
		r -= 1
		b -= 1
		g -= 1
		w += 3
		e = 0
		if r % 2 == 0:
			e += 1
		if g % 2 == 0:
			e += 1
		if b % 2 == 0:
			e += 1
		if w % 2 == 0:
			e += 1
		if e >= 3:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	tot = r + g + b + w
	mi = min(r, g, b)
	s = r % 2 + g % 2 + b % 2 + w % 2
	if s > 1:
		if mi >= 1:
			r -= 1
			g -= 1
			b -= 1
			w += 3
	s = r % 2 + g % 2 + b % 2 + w % 2
	if s <= 1:
		print('Yes')
	else:
		print('No')


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
sys.setrecursionlimit(10 ** 6)
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	l = [r, g, b, w]
	(o, e) = (0, 0)
	for i in l:
		if i % 2 == 0:
			e += 1
		elif i % 2 != 0:
			o += 1
	if r == 0 or g == 0 or b == 0:
		if o <= 1:
			print('Yes')
		else:
			print('No')
	elif e == 0 or e == 1 or e == 3 or (e == 4):
		print('Yes')
	else:
		print('No')


from sys import stdin
input = lambda : stdin.readline().strip()
from collections import deque as d
import math
l = len
for t in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	r = a % 2 + b % 2 + c % 2 + d % 2
	if r < 2 or (a * b * c and r > 2):
		print('Yes')
	else:
		print('No')


def func():
	numBalls = input().split()
	[r, g, b, w] = [int(i) for i in numBalls]
	x = 0
	if r % 2:
		x += 1
	x *= 2
	if g % 2:
		x += 1
	x *= 2
	if b % 2:
		x += 1
	x *= 2
	if w % 2:
		x += 1
	skelaton = [0, 1, 2, 4, 7, 8, 11, 13, 14, 15]
	if r and g and b:
		if x in skelaton:
			print('Yes')
		else:
			print('No')
	else:
		skelaton_new = [0, 1, 2, 4, 8, 14, 15]
		if x in skelaton_new:
			print('Yes')
		else:
			print('No')
numTest = int(input())
while numTest:
	numTest -= 1
	func()


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	s = r + g + b + w
	if s % 2 == 0:
		if r % 2 == g % 2 == b % 2 == w % 2:
			print('Yes')
		else:
			print('No')
	elif r % 2 + g % 2 + b % 2 + w % 2 == 1:
		print('Yes')
	else:
		m = min(r, g, b)
		if m == 0 or r % 2 + g % 2 + b % 2 + w % 2 != 3:
			print('No')
		else:
			print('Yes')


t = int(input())
for _ in range(t):
	balls = list(map(int, input().split()))
	ball = [i for i in balls if i % 2 == 0]
	if len(ball) >= 3:
		print('YES')
	elif 4 - len(ball) == 3:
		balls.pop(3)
		if 0 in balls:
			print('NO')
		else:
			print('YES')
	elif 4 - len(ball) == 2:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	a = min(r, g, b)
	m1 = [r % 2, g % 2, b % 2, w % 2]
	if a == 0 and m1.count(0) >= 3:
		print('YES')
	elif a == 0 and m1.count(0) != 3:
		print('NO')
	elif a != 0 and (m1.count(1) >= 3 or m1.count(0) >= 3):
		print('YES')
	else:
		print('NO')


def solve(r, g, b, w):
	total = r + g + b + w
	num_odds = sum([i % 2 for i in [r, g, b, w]])
	num_zeros = sum([i == 0 for i in [r, g, b]])
	if total % 2 == 0:
		if num_odds == 0 or (num_odds == 4 and num_zeros == 0):
			return True
		return False
	else:
		if num_odds == 1 or (num_odds == 3 and num_zeros == 0):
			return True
		return False
for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	ans = solve(r, g, b, w)
	print('Yes' if ans else 'No')


import time
from collections import deque

def inpt():
	return int(input())

def inpl():
	return list(map(int, input().split()))

def inpm():
	return map(int, input().split())

def solve():
	l = inpl()
	(r, g, b, w) = l
	e = 0
	o = 0
	if r % 2 == 0:
		e += 1
	else:
		o += 1
	if g % 2 == 0:
		e += 1
	else:
		o += 1
	if b % 2 == 0:
		e += 1
	else:
		o += 1
	if w % 2 == 0:
		e += 1
	else:
		o += 1
	if e == 4:
		print('YES')
	elif o == 1:
		print('YES')
	elif e == 2:
		print('NO')
	else:
		for i in l[:3]:
			if i % 2 == 0 and i > 0:
				print('YES')
				return
			elif i % 2 == 0:
				print('NO')
				return
		print('YES')

def main():
	m = 10 ** 9 + 7
	t = int(input())
	while t:
		t -= 1
		solve()
main()


T = int(input())
for _ in range(T):
	(r, g, b, w) = map(int, input().split())
	n = r % 2 + g % 2 + b % 2 + w % 2
	if n <= 1:
		print('YES')
	elif r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 1
		n = r % 2 + g % 2 + b % 2 + w % 2
		if n <= 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	(r, g, b, w) = map(int, inputi().split())
	odds = r % 2 + g % 2 + b % 2 + w % 2
	if odds <= 1:
		print('YES')
		return
	if r > 0 and g > 0 and (b > 0):
		odds = (r - 1) % 2 + (g - 1) % 2 + (b - 1) % 2 + (w + 3) % 2
		if odds <= 1:
			print('YES')
			return
	print('NO')

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


def count_odds(a):
	cnt = 0
	for i in a:
		if i > 0 and i % 2 == 1:
			cnt += 1
	return cnt

def count_evens(a):
	cnt = 0
	for i in a:
		if i > 1 and i % 2 == 0:
			cnt += 1
	return cnt

def count_elements(a):
	cnt = 0
	for i in a:
		if i > 0:
			cnt += 1
	return cnt

def count_negative(a):
	cnt = 0
	for i in a:
		if i < 0:
			cnt += 1
	return cnt

def solve(r, g, b, w):
	neg = count_negative([r, g, b, w])
	if neg > 0:
		return False
	odds = count_odds([r, g, b, w])
	evens = count_evens([r, g, b, w])
	el = count_elements([r, g, b, w])
	if odds > 1:
		return False
	return True

def read():
	for i in range(int(input())):
		(r, g, b, w) = list(map(int, input().strip().split()))
		if solve(r, g, b, w) or solve(r - 1, g - 1, b - 1, w + 3):
			print('Yes')
		else:
			print('No')
read()


for i in range(int(input())):
	(r, g, b, w) = list((int(x) for x in input().split()))
	e = (r % 2 == 0) + (g % 2 == 0) + (b % 2 == 0) + (w % 2 == 0)
	if e >= 3 or e == 0:
		print('Yes')
	elif e == 1 and r * g * b > 0:
		print('Yes')
	else:
		print('No')


T = int(input())

def odd(n):
	return n % 2 != 0
for t in range(T):
	line = [int(x) for x in input().split(' ')]
	(r, g, b, w) = line
	odds = [odd(r), odd(g), odd(b), odd(w)]
	if odds.count(True) <= 1:
		print('Yes')
		continue
	if min(r, g, b) == 0:
		print('No')
		continue
	odds = [not x for x in odds]
	if odds.count(True) <= 1:
		print('Yes')
		continue
	print('No')


t = int(input())
for z in range(t):
	ans = False
	count = 0
	array = input().split()
	a = int(array[0])
	b = int(array[1])
	c = int(array[2])
	d = int(array[3])
	for x in range(4):
		if int(array[x]) % 2 == 0:
			count += 1
	if (count == 1 or count == 0) and (a == 0 or b == 0 or c == 0) or count == 2:
		ans = False
	else:
		ans = True
	if ans:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	t = t - 1
	a = [int(j) for j in input().split()]
	cnt = 0
	for i in a:
		if i % 2 != 0:
			cnt += 1
	flag = 0
	if cnt == 0 or cnt == 1:
		print('Yes')
		flag = 1
	else:
		temp = min(a[0], a[1], a[2])
		if temp > 0:
			i = 1
			a[0] -= i
			a[1] -= i
			a[2] -= i
			a[3] += 3 * i
			cnt = 0
			for i in a:
				if i % 2 != 0:
					cnt += 1
			if cnt == 0 or cnt == 1:
				print('Yes')
				flag = 1
	if flag == 0:
		print('No')


n = int(input())
for x in range(0, n):
	arr = input().split(' ')
	int_arr = []
	for y in arr:
		int_arr.append(int(y))
	if int_arr[0] % 2 == 0 and int_arr[1] % 2 == 0 and (int_arr[2] % 2 == 0) and (int_arr[3] % 2 == 0):
		print('Yes')
	else:
		count = 0
		for x in int_arr:
			count += x % 2
		if count == 1:
			print('Yes')
		elif count == 3:
			if int_arr[0] != 0 and int_arr[1] != 0 and (int_arr[2] != 0):
				print('Yes')
			else:
				print('No')
		elif count == 4:
			print('Yes')
		else:
			print('No')


import sys
from math import *
for _ in range(int(input())):
	n = 4
	a = list(map(int, input().split()))
	c = 0
	f = 0
	for i in range(4):
		if i != 3 and a[i] == 0:
			f = 1
		if a[i] & 1:
			c += 1
	if c == 2 or (f == 1 and c > 1):
		print('No')
	else:
		print('Yes')


t = input()
t = int(t)
while t > 0:
	s = input()
	s = [int(x) for x in s.split()]
	odds = 0
	for i in range(len(s)):
		if s[i] % 2 != 0:
			odds += 1
	if odds <= 1:
		print('Yes')
		t -= 1
		continue
	if s[0] > 0 and s[1] > 0 and (s[2] > 0):
		s[0] -= 1
		s[1] -= 1
		s[2] -= 1
		s[3] += 3
	odds = 0
	for i in range(len(s)):
		if s[i] % 2 != 0:
			odds += 1
	if odds <= 1:
		print('Yes')
		t -= 1
		continue
	print('No')
	t -= 1


t = int(input())
while t:
	(r, g, b, w) = map(int, input().split())
	if w % 2 == 1:
		(odd, eve) = (0, 0)
		z = 0
		if r == 0 or g == 0 or b == 0:
			z = 1
		if r % 2 == 0:
			eve += 1
		else:
			odd += 1
		if g % 2 == 0:
			eve += 1
		else:
			odd += 1
		if b % 2 == 0:
			eve += 1
		else:
			odd += 1
		if odd >= 2 and z == 0 or eve == 3:
			print('Yes')
		else:
			print('No')
	else:
		z = 0
		if r == 0 or g == 0 or b == 0:
			z = 1
		(odd, eve) = (0, 0)
		if r % 2 == 0:
			eve += 1
		else:
			odd += 1
		if g % 2 == 0:
			eve += 1
		else:
			odd += 1
		if b % 2 == 0:
			eve += 1
		else:
			odd += 1
		if odd == 3 and z == 0 or odd == 1 or eve == 3:
			print('Yes')
		else:
			print('No')
	t -= 1


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	array = [r, g, b, w]
	count_odd = 0
	count_even = 0
	for i in array:
		if i % 2:
			count_odd += 1
	if count_odd <= 1:
		print('YES')
		continue
	else:
		array = array[:-1]
		count_zero = 0
		count_odd = 0
		for i in array:
			if not i:
				count_zero += 1
			elif not i % 2:
				count_even += 1
			if i % 2:
				count_odd += 1
		count_odd += 1 if w % 2 else 0
		if not count_zero:
			if count_odd >= 3:
				print('YES')
			else:
				print('NO')
			continue
		if count_zero:
			if count_even >= 3 - count_zero:
				print('YES')
			else:
				print('NO')


for t in range(int(input())):
	arr = [int(k) for k in input().split()]
	odd = 0
	for ele in arr:
		if ele % 2 == 1:
			odd += 1
	if odd < 2:
		print('Yes')
		continue
	if arr[0] > 0 and arr[1] > 0 and (arr[2] > 0):
		odda = 0
		arr[0] -= 1
		arr[1] -= 1
		arr[2] -= 1
		arr[3] += 3
		for ele in arr:
			if ele % 2 == 1:
				odda += 1
		if odda < 2:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	a = [int(i) for i in input().split()]
	count = 0
	temp = 0
	for i in a[:3]:
		if i % 2 == 1:
			count += 1
	if count == 0 or count == 3:
		print('Yes')
		temp = 1
	elif count == 1 and a[3] % 2 == 0 and (a[:3].count(0) == 0):
		print('Yes')
		temp = 1
	elif count == 2 and a[3] % 2 == 1 and (a[:3].count(0) == 0):
		print('Yes')
		temp = 1
	elif a[:3].count(0) == 1:
		if count == 1 and a[3] % 2 == 0:
			print('Yes')
			temp = 1
	elif a[:3].count(0) == 2:
		if count == 1 and a[3] % 2 == 0:
			print('Yes')
			temp = 1
	if temp == 0:
		print('No')


t = int(input(''))

def odd(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		return True
	else:
		return False
for i in range(t):
	l = [int(x) for x in input('').split()]
	r = l[0]
	g = l[1]
	b = l[2]
	w = l[3]
	if odd(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and odd(r - 1, g - 1, b - 1, w + 1):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	show = [r & 1, g & 1, b & 1, w & 1]
	show.sort()
	if show[:3] == [0, 0, 0] or (show == [0, 1, 1, 1] and r * g * b) or show == [1, 1, 1, 1]:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	colors = [int(x) for x in input().split()]
	oddCount = 0
	for j in range(4):
		if colors[j] % 2 == 1:
			oddCount += 1
	if oddCount <= 1 or oddCount == 4:
		print('Yes')
	elif oddCount == 3:
		true = True
		for j in range(3):
			if colors[j] == 0:
				true = False
		if true:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def get_int():
	return int(input())

def get_ints():
	return tuple((int(i) for i in input().split()))

def get_str():
	return int(input())

def get_strs():
	return tuple((i for i in input().split()))

def p664_a():

	def can_be_palindrome(r: int, g: int, b: int, w: int) -> bool:
		if any((j < 0 for j in (r, g, b, w))):
			return False
		num_odds = len([j for j in (r, g, b, w) if j % 2 == 1])
		return num_odds <= 1

	def dfs(r, g, b, w):
		for j in range(3):
			if can_be_palindrome(r - j, g - j, b - j, w + 3 * j):
				return True
		m = min(r, g, b)
		if can_be_palindrome(r - m, g - m, b - m, w + 3 * m):
			return True
		return False
	t = get_int()
	strings = {True: 'Yes', False: 'No'}
	for i in range(t):
		(r, g, b, w) = get_ints()
		print(strings[dfs(r, g, b, w)])
p664_a()


t = int(input())
while t:
	(r, g, b, w) = map(int, input().split())
	counta = r % 2 + g % 2 + b % 2
	countb = w % 2
	if counta == 0:
		print('Yes')
	elif counta == 1 and countb == 0:
		print('Yes')
	elif counta == 2 and countb == 1:
		if r > 0 and b > 0 and (g > 0):
			print('Yes')
		else:
			print('No')
	elif counta == 2 and countb == 0:
		print('No')
	elif counta == 1 and countb == 1:
		print('No')
	elif counta == 3:
		print('Yes')
	t = t - 1


t = int(input())
l = []
for i in range(t):
	s = list(map(int, input().split()))
	l.append(s)
for j in l:
	e = 0
	for n in j:
		if n % 2 == 0:
			e += 1
	if e == 4 or e == 3:
		print('YES')
	else:
		j[0] -= 1
		j[1] -= 1
		j[2] -= 1
		j[3] += 3
		if j[0] >= 0 and j[1] >= 0 and (j[2] >= 0):
			e1 = 0
			for m in j:
				if m % 2 == 0:
					e1 += 1
			if e1 == 4 or e1 == 3:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


t = int(input())
for i in range(t):
	A = list(map(int, input().split()))
	a = 0
	ch = 0
	nch = 0
	ans = 0
	for i in range(3):
		if A[a] == 0:
			A.remove(A[a])
		else:
			a += 1
	for j in range(len(A)):
		if A[j] % 2 == 0:
			ch += 1
		else:
			nch += 1
	if len(A) == 4 and (ch == 4 or ch == 3 or ch == 1 or (ch == 0)):
		ans += 1
	if len(A) == 3 and (ch == 3 or ch == 2):
		ans += 1
	if len(A) == 2 and (ch == 2 or ch == 1):
		ans += 1
	if len(A) == 1:
		ans += 1
	if ans == 0:
		print('No')
	else:
		print('Yes')


for aww in range(int(input())):
	a = [*map(int, input().split())]
	e = 0
	o = 0
	j1 = 0
	for i in range(len(a)):
		if a[i] % 2 == 0:
			e += 1
		else:
			o += 1
	if e == 1 and min(a[:3]) > 0:
		print('Yes')
	elif e > 2:
		print('Yes')
	elif min(a) > 0 and e == 0:
		print('Yes')
	else:
		print('No')


s = []
t = int(input())
for i in range(t):
	x = 0
	a = list(map(int, input().split(' ')))
	if (a[0] + a[1] + a[2] + a[3]) % 2 == 0:
		if a[0] % 2 == 0 and a[1] % 2 == 0 and (a[2] % 2 == 0) and (a[3] % 2 == 0):
			s.append('Yes')
		elif a[0] % 2 != 0 and a[1] % 2 != 0 and (a[2] % 2 != 0) and (a[3] % 2 != 0):
			s.append('Yes')
		else:
			s.append('No')
	else:
		for i in range(4):
			if a[i] % 2 != 0:
				x += 1
		if a[0] == 0 or a[1] == 0 or a[2] == 0:
			if x == 3:
				s.append('No')
			else:
				s.append('Yes')
		else:
			s.append('Yes')
for i in s:
	print(i)


testcases = int(input())
for i in range(testcases):
	l = list(map(int, input().split()))
	odd = 0
	for i in l:
		if i % 2 != 0:
			odd += 1
	if odd in (0, 1, 4) or (odd == 3 and 0 not in (l[0], l[1], l[2])):
		print('Yes')
	else:
		print('No')


def is_odd(a):
	if a % 2 == 1:
		return True
	return False
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	(zeroes, odds) = (0, 0)
	if r == 0:
		zeroes += 1
	if g == 0:
		zeroes += 1
	if b == 0:
		zeroes += 1
	if w == 0:
		zeroes += 1
	if is_odd(r):
		odds += 1
	if is_odd(g):
		odds += 1
	if is_odd(b):
		odds += 1
	if is_odd(w):
		odds += 1
	even = 4 - odds
	if zeroes == 4 or zeroes == 3:
		print('YES')
	elif zeroes == 1:
		if w != 0:
			if odds <= 1:
				print('YES')
			else:
				print('NO')
		elif min(odds, even) <= 1:
			print('YES')
		else:
			print('NO')
	elif zeroes == 2:
		if odds == 2:
			print('NO')
		else:
			print('YES')
	elif min(odds, even) <= 1:
		print('YES')
	else:
		print('NO')


def test(*colors):
	return sum([c % 2 != 0 for c in colors]) < 2

def good():
	(r, g, b, w) = map(int, input().split())
	test1 = test(r, g, b, w)
	m = min(r, g, b)
	test2 = test3 = False
	if m != 0:
		test2 = test(r - 1, g - 1, b - 1, w + 3)
		test3 = test(r - m, g - m, b - m, w + 3 * m)
	return any([test1, test2, test3])

def main():
	T = int(input())
	for _ in range(T):
		if good():
			print('Yes')
		else:
			print('No')
main()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	temp = False
	if (r + g + b + w) % 2 == 0:
		if r % 2 == g % 2 and g % 2 == b % 2 and (g % 2 == w % 2):
			if r % 2 == 0:
				temp = True
			elif r != 0 and b != 0 and (g != 0):
				temp = True
			else:
				temp = False
		else:
			temp = False
	else:
		odd = 0
		for i in [r, g, b, w]:
			if i % 2 == 1:
				odd += 1
		if odd == 1:
			temp = True
		elif odd == 3 and r != 0 and (b != 0) and (g != 0):
			temp = True
	if temp:
		print('Yes')
	else:
		print('No')


x = int(input())
for i in range(0, x):
	m = list(map(int, input().split()))[:4]
	d = m[0] % 2 + m[1] % 2 + m[2] % 2 + m[3] % 2
	if d < 2 or (m[0] * m[1] * m[2] > 0 and d > 2):
		print('Yes')
	else:
		print('No')


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
sys.setrecursionlimit(300000)

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default=0, func=lambda a, b: max(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] < key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for ik in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a % 2 == 1 and b % 2 == 0 and (c % 2 == 0) and (d % 2 == 0):
		print('YES')
	elif a % 2 == 0 and b % 2 == 1 and (c % 2 == 0) and (d % 2 == 0):
		print('YES')
	elif a % 2 == 0 and b % 2 == 0 and (c % 2 == 1) and (d % 2 == 0):
		print('YES')
	elif a % 2 == 0 and b % 2 == 0 and (c % 2 == 0) and (d % 2 == 1):
		print('YES')
	elif a % 2 == 0 and b % 2 == 0 and (c % 2 == 0) and (d % 2 == 0):
		print('YES')
	else:
		if a <= 0 or b <= 0 or c <= 0:
			print('NO')
			continue
		a -= 1
		b -= 1
		c -= 1
		d += 3
		if a % 2 == 1 and b % 2 == 0 and (c % 2 == 0) and (d % 2 == 0):
			print('YES')
		elif a % 2 == 0 and b % 2 == 1 and (c % 2 == 0) and (d % 2 == 0):
			print('YES')
		elif a % 2 == 0 and b % 2 == 0 and (c % 2 == 1) and (d % 2 == 0):
			print('YES')
		elif a % 2 == 0 and b % 2 == 0 and (c % 2 == 0) and (d % 2 == 1):
			print('YES')
		elif a % 2 == 0 and b % 2 == 0 and (c % 2 == 0) and (d % 2 == 0):
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	sum = r + g + b + w
	if sum % 2 == 0:
		if r % 2 == g % 2 == b % 2 == w % 2 == 0 or r % 2 == g % 2 == b % 2 == w % 2 == 1:
			print('Yes')
		else:
			print('No')
	else:
		if r % 2 == g % 2 == b % 2 == 0 or r % 2 == g % 2 == b % 2 == 1:
			print('Yes')
			continue
		elif w % 2 == 0:
			print('Yes')
			continue
		elif w % 2 == 1:
			if 0 not in [r, g, b]:
				print('Yes')
				continue
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		print('Yes')
	else:
		l = [r, g, b, w]
		odd = 0
		zero = 0
		for i in l:
			if i % 2 != 0:
				odd += 1
			elif i == 0:
				zero += 1
		if (odd == 1 or odd == 0) or (odd == 3 and zero != 1) or odd == 4 or (odd == 3 and w == 0):
			print('Yes')
		else:
			print('No')


n = int(input())
for i in range(n):
	x = [int(num) for num in input().split(' ')]
	pares = 0
	impares = 0
	contdor = 0
	for k in range(4 - 1):
		if x[k] > 0:
			contdor += 1
	for j in range(5 - 1):
		if x[j] % 2 == 0:
			pares += 1
		else:
			impares += 1
	if pares > impares:
		print('Yes')
	elif contdor == 3:
		if pares == impares:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	(a, b, c, d) = [int(i) for i in input().split()]
	e = 0
	if a % 2 == 0:
		e = e + 1
	if b % 2 == 0:
		e = e + 1
	if c % 2 == 0:
		e = e + 1
	if d % 2 == 0:
		e = e + 1
	f = 4 - e
	if e == 4 or f == 4:
		print('Yes')
	elif f == 1:
		print('Yes')
	elif a == 0 or b == 0 or c == 0:
		print('No')
	else:
		a = a - 1
		b = b - 1
		c = c - 1
		d = d + 3
		g = 0
		if a % 2 == 0:
			g = g + 1
		if b % 2 == 0:
			g = g + 1
		if c % 2 == 0:
			g = g + 1
		if d % 2 == 0:
			g = g + 1
		h = 4 - g
		if h == 1:
			print('Yes')
		else:
			print('No')


n = int(input())
for i in range(n):
	x = [int(x) for x in input().split(' ')]
	par = 0
	impar = 0
	cont = 0
	for k in range(3):
		if x[k] > 0:
			cont += 1
	for j in range(4):
		if x[j] % 2 == 0:
			par += 1
		else:
			impar += 1
	if par > impar:
		print('Yes')
	elif cont == 3:
		if par == impar:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 != 0
t = int(input())
for _ in range(t):
	lis = [int(i) for i in input().split()]
	(r, g, b, w) = lis
	pos = [i > 0 for i in lis]
	odd = [i & 1 for i in lis]
	odd_qtd = sum(odd)
	even_qtd = 4 - odd_qtd
	if odd_qtd in [4, 0, 1]:
		print('Yes')
	elif odd_qtd == 3:
		if all([i > 0 for i in lis[:-1]]):
			print('Yes')
		else:
			print('No')
	else:
		print('No')
		continue
		if is_even(min([r, g, b])):
			print('No')
		elif all(pos):
			print('Yes')
		else:
			print('No')


def evencount(r, g, b, w):
	c = 0
	if r % 2 == 0:
		c += 1
	if g % 2 == 0:
		c += 1
	if b % 2 == 0:
		c += 1
	if w % 2 == 0:
		c += 1
	return c
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	t = evencount(r, g, b, w)
	if t == 4 or t == 3:
		print('Yes')
	elif (t == 1 or t == 0) and r != 0 and (g != 0) and (b != 0):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	cl = list(map(int, input().split()))
	co = 0
	ce = 0
	fl = 0
	for i in range(4):
		if cl[i] == 0 and i != 3:
			fl = 1
		if cl[i] % 2 == 0:
			ce += 1
		else:
			co += 1
	if co <= 1 or (ce <= 1 and fl == 0):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	oness = 0
	for i in [r, b, g, w]:
		if i % 2 != 0:
			oness += 1
	if oness < 2:
		print('YES')
	elif r >= 1 and g >= 1 and (b >= 1):
		w += 3
		b -= 1
		r -= 1
		g -= 1
		oness = 0
		for j in [r, g, b, w]:
			if j % 2 != 0:
				oness += 1
		if oness >= 2:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	rgb = [r, g, b]
	cnt = 0
	if min(rgb) == 0:
		if r % 2 == 0:
			cnt += 1
		if g % 2 == 0:
			cnt += 1
		if b % 2 == 0:
			cnt += 1
		if w % 2 == 0:
			cnt += 1
		if cnt >= 3:
			print('yes')
		else:
			print('no')
	elif min(rgb) != 0:
		if r % 2 == 0:
			cnt += 1
		if g % 2 == 0:
			cnt += 1
		if b % 2 == 0:
			cnt += 1
		if w % 2 == 0:
			cnt += 1
		if cnt >= 3 or cnt <= 1:
			print('yes')
		else:
			print('no')


def next_int():
	return int(input())

def next_ints():
	return [int(x) for x in input().split()]

def sum_odd(a, b, c, d):
	return a % 2 + b % 2 + c % 2 + d % 2
T = next_int()
for t in range(0, T):
	(r, g, b, w) = next_ints()
	s = r + g + b + w
	op_possible = min(r, g, b) > 0
	so1 = sum_odd(r, g, b, w)
	so2 = sum_odd(r - 1, g - 1, b - 1, w + 3) if op_possible == True else -1
	if s % 2 == 0:
		if so1 == 0 or so2 == 0:
			print('YES')
		else:
			print('NO')
	elif so1 == 1 or so2 == 1:
		print('YES')
	else:
		print('NO')


a = int(input())
i = 0
while i < a:
	b = input().split(' ')
	s = int(b[0])
	v = int(b[1])
	l = int(b[2])
	p = int(b[3])
	o = 0
	cnt = 0
	while s != -1 and v != -1 and (l != -1) and (cnt < 2):
		n = 0
		if s % 2 == 1:
			n = n + 1
		if v % 2 == 1:
			n = n + 1
		if l % 2 == 1:
			n = n + 1
		if p % 2 == 1:
			n = n + 1
		if n == 1 or n == 0:
			print('Yes')
			o = o + 1
			break
		s = s - 1
		v = v - 1
		l = l - 1
		p = p + 3
		cnt = cnt + 1
	if o == 0:
		print('No')
	i = i + 1


def change(a):
	for i in range(0, 3):
		a[i] -= 1
	a[3] += 3

def check(a, b):
	c = 0
	for i in range(0, 4):
		if a[i] % 2 == 1:
			c += 1
	if b == True and c == 0 or (b == False and c == 1):
		return 1
	else:
		return 0
n = int(input())
a = []
for i in range(0, n):
	a.append(list(map(int, input().split())))
b = False
for i in range(0, n):
	if sum(a[i]) % 2 == 0:
		b = True
	else:
		b = False
	if check(a[i], b) == 1:
		print('YES')
	else:
		if a[i][0] != 0 and a[i][1] != 0 and (a[i][2] != 0):
			change(a[i])
		if check(a[i], b) == 1:
			print('YES')
		else:
			print('NO')


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
import itertools

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Lcm(x, y):
	return x * y // gcd(x, y)

def dtob(n):
	return bin(n).replace('0b', '')

def btod(n):
	return int(n, 2)

def common(l1, l2):
	return set(l1).intersection(l2)

def solution():
	for _ in range(Int()):
		(r, g, b, w) = Mint()
		s = r % 2 + g % 2 + b % 2 + w % 2
		if s == 2 or (s > 2 and r * g * b == 0):
			print('NO')
		else:
			print('YES')
solution()


t = int(input())
for i in range(t):
	n = list(map(int, input().split()))
	mapN = []
	flag = 0
	white = 0
	count = 0
	for j in range(len(n)):
		if n[j] == 0:
			count += 1
		if n[j] % 2 == 0:
			mapN.append(0)
		else:
			mapN.append(1)
	if count == 3 or count == 4:
		flag = 1
	elif count == 2:
		add1 = sum(mapN)
		if add1 < 2:
			flag = 1
	elif count == 1 and n[-1] == 0:
		add1 = sum(mapN)
		if add1 in [0, 1, 3]:
			flag = 1
	elif count == 1 and n[-1] > 0:
		add1 = sum(mapN)
		if add1 in [0, 1]:
			flag = 1
	else:
		add1 = sum(mapN[:3])
		if add1 in [0, 3]:
			flag = 1
		elif add1 == 1:
			if mapN[-1] == 0:
				flag = 1
		elif mapN[-1] == 1:
			flag = 1
	if flag == 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	zero = r * g * b
	one = r % 2 + g % 2 + b % 2 + w % 2
	if one < 2 or (one > 2 and zero > 0):
		print('Yes\n')
	else:
		print('No\n')


for _ in range(int(input())):
	n = list(map(int, input().split()))
	k = list(map(lambda x: x % 2, n))
	if k.count(1) <= 1:
		print('Yes')
	else:
		mn = min(n[:3])
		f = k[:3].count(1)
		fs = k[3] % 2
		if mn > 2:
			mn = 2
		fl = False
		while mn > 0:
			f = 3 - f
			fs = not fs
			if f + fs <= 1:
				fl = True
				break
			mn -= 1
		print('Yes' if fl else 'No')


n = int(input())
for _ in range(n):
	(r, g, b, w) = map(int, input().split())
	s = r % 2 + g % 2 + b % 2 + w % 2
	if s < 2:
		print('YES')
	elif min([r, g, b]) == 0:
		print('NO')
	else:
		s = (r - 1) % 2 + (g - 1) % 2 + (b - 1) % 2 + (w + 3) % 2
		if s < 2:
			print('YES')
		else:
			print('NO')


q = lambda : int(r & 1 == 1) + int(g & 1 == 1) + int(b & 1 == 1) + int(w & 1 == 1)
for i in range(int(input())):
	t = 1
	(r, g, b, w) = map(int, input().split())
	if q() == 2 or (q() == 3 and r * g * b == 0):
		t = 0
	print('YES' if t else 'NO')


t = int(input())
while t > 0:
	(r, g, b, w) = input().split()
	r = int(r)
	g = int(g)
	b = int(b)
	w = int(w)
	x = 0
	c = 0
	l = 0
	k = 0
	if r == 0 or b == 0 or g == 0:
		if r % 2 != 0:
			k += 1
		if b % 2 != 0:
			k += 1
		if g % 2 != 0:
			k += 1
		if k == 2:
			print('No')
			t -= 1
			continue
	if r % 2 == 0:
		c += 1
	else:
		l += 1
	if g % 2 == 0:
		c += 1
	else:
		l += 1
	if b % 2 == 0:
		c += 1
	else:
		l += 1
	if w % 2 == 0:
		if l == 2:
			print('No')
		else:
			print('Yes')
	if w % 2 != 0:
		if l == 1:
			print('No')
		else:
			print('Yes')
	t -= 1


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
import os
from io import BytesIO, IOBase
import sys

def main():
	for _ in range(int(input())):
		(a, b, c, d) = map(int, input().split())
		(A, B, C, D) = (a & 1, b & 1, c & 1, d & 1)
		if min(a, b, c) == 0:
			print('Yes' if A + B + C + D <= 1 else 'No')
			continue
		if A + B + C + D <= 1:
			print('Yes')
			continue
		flag = False
		for i in range(min(10, a, b, c)):
			a -= 1
			b -= 1
			c -= 1
			d += 1
			(A, B, C, D) = (a & 1, b & 1, c & 1, d & 1)
			if A + B + C + D <= 1:
				flag = True
		print('Yes' if flag else 'No')
	return
BUFSIZE = 1048576

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


for i in range(int(input())):
	a = list(map(int, input().split()))
	odd = 0
	for j in range(len(a)):
		if a[j] % 2 == 1:
			odd = odd + 1
	if odd <= 1:
		print('Yes')
	elif a[0] > 0 and a[1] > 0 and (a[2] > 0):
		a[0] -= 1
		a[1] -= 1
		a[2] -= 1
		a[3] += 3
		odd = 0
		for k in range(len(a)):
			if a[k] % 2 == 1:
				odd = odd + 1
		if odd <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	if (r + g + b + w) % 2 == 0:
		if r % 2 == g % 2 == b % 2 == w % 2 == 0:
			print('Yes')
		elif r % 2 == g % 2 == b % 2 == w % 2 == 1:
			print('Yes')
		else:
			print('No')
	else:
		counter = 0
		arr = [r, g, b, w]
		for el in arr:
			if el % 2 != 0:
				counter += 1
		if counter == 1:
			print('Yes')
		elif counter == 3:
			if r > 0 and g > 0 and (b > 0):
				print('Yes')
			else:
				print('No')
		else:
			print('No')


def tc():
	(r, g, b, w) = map(int, input().split())
	(odd, even) = (0, 0)
	for c in (r, g, b, w):
		if c % 2:
			odd += 1
		else:
			even += 1
	if even >= 3:
		print('YES')
	elif odd >= 3 and all((c > 0 for c in (r, g, b))):
		print('YES')
	else:
		print('NO')
T = int(input())
for _ in range(T):
	tc()


for _ in range(int(input())):
	ls = list(map(int, input().split()))
	oddcnt = 0
	for i in range(4):
		if ls[i] % 2 != 0:
			oddcnt += 1
	if oddcnt <= 1:
		print('YES')
	elif (oddcnt == 4 or oddcnt == 3) and ls[0] > 0 and (ls[1] > 0) and (ls[2] > 0):
		print('YES')
	else:
		print('NO')


T = int(input())

def hjCounter(data):
	j = 0
	h = 0
	for e in data:
		if e % 2 == 0:
			j += 1
		else:
			h += 1
	return (h, j)
for _ in range(T):
	(r, g, b, w) = map(int, input().split())
	(h, j) = hjCounter((r, g, b, w))
	if r == g == b == w:
		print('YES')
		continue
	elif w % 2 == 1:
		if j == 1:
			if r == 0 or g == 0 or b == 0:
				print('NO')
			else:
				print('YES')
		elif j == 2:
			print('NO')
		else:
			print('YES')
	elif j == 1:
		if r == 0 or g == 0 or b == 0:
			print('NO')
		else:
			print('YES')
	elif j == 2:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	cList = [r, g, b, w]
	tmp = 0
	res = 0
	for i in range(len(cList)):
		if cList[i] % 2 == 0:
			tmp += 1
		else:
			res += 1
	if r * g * b == 0:
		if res <= 1:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if tmp == 4:
		print('Yes')
		continue
	elif tmp == 3 and res == 1:
		print('Yes')
		continue
	elif res == 4:
		print('Yes')
		continue
	elif res == 3 and tmp == 1:
		print('Yes')
		continue
	else:
		print('No')
		continue


t = int(input())
for i in range(t):
	(a, b, c, d) = map(int, input().split())
	m = min(a, b, c)
	oc = 0
	if a % 2 != 0:
		oc += 1
	if b % 2 != 0:
		oc += 1
	if c % 2 != 0:
		oc += 1
	df = 0
	if a % 2 != 0 and a != 0:
		df += 1
	if b % 2 != 0 and b != 0:
		df += 1
	if c % 2 != 0 and c != 0:
		df += 1
	if d % 2 != 0 and d != 0:
		df += 1
	if df <= 1:
		print('Yes')
		continue
	if a == 0 or b == 0 or c == 0:
		if df > 1:
			print('No')
			continue
	w = d % 2
	if oc == 3:
		print('Yes')
	elif oc == 2:
		if w:
			print('Yes')
		else:
			print('No')
	elif oc == 1:
		if w == 0:
			print('Yes')
		else:
			print('No')
	elif oc == 0:
		if w == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


q = int(input())
for t in range(q):
	ch = input()
	L = [int(i) for i in ch.split()]
	(a, b, c, d) = (L[0], L[1], L[2], L[3])
	nb = 0
	if a % 2 == 0:
		nb += 1
	if b % 2 == 0:
		nb += 1
	if c % 2 == 0:
		nb += 1
	if d % 2 == 0:
		nb += 1
	test = False
	if nb >= 3 and a >= 0 and (b >= 0) and (c >= 0) and (d >= 0):
		test = True
	for j in range(4):
		a -= 1
		b -= 1
		c -= 1
		d += 3
		nb = 0
		if a % 2 == 0:
			nb += 1
		if b % 2 == 0:
			nb += 1
		if c % 2 == 0:
			nb += 1
		if d % 2 == 0:
			nb += 1
		if nb >= 3 and a >= 0 and (b >= 0) and (c >= 0) and (d >= 0):
			test = True
	if test:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	(r, g, b, w) = map(int, input().split())
	count = 0
	ans = False
	if r % 2 != 0:
		count += 1
	if g % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	if w % 2 != 0:
		count += 1
	if count < 2:
		ans = True
	round = 0
	while r >= 0 and g >= 0 and (b >= 0):
		round += 1
		if round >= 5:
			break
		count = 0
		if r % 2 != 0:
			count += 1
		if g % 2 != 0:
			count += 1
		if b % 2 != 0:
			count += 1
		if w % 2 != 0:
			count += 1
		if count < 2:
			ans = True
			break
		else:
			r -= 1
			b -= 1
			g -= 1
			w += 3
	if ans:
		print('Yes')
	else:
		print('No')


c = int(input())
for i in range(c):
	(r, g, b, w) = input().split()
	r = int(r)
	g = int(g)
	b = int(b)
	w = int(w)
	even = 0
	odd = 0
	if r % 2 == 0:
		even += 1
	else:
		odd += 1
	if g % 2 == 0:
		even += 1
	else:
		odd += 1
	if b % 2 == 0:
		even += 1
	else:
		odd += 1
	if w % 2 == 0:
		even += 1
	else:
		odd += 1
	count = 0
	if even == 4:
		count = 1
	elif even == 3:
		count = 1
	elif even == 2:
		count = -1
	elif even == 1:
		if r == 0 or g == 0 or b == 0:
			count = -1
		else:
			count = 1
	elif even == 0:
		count = 1
	if count == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for case in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	nodd = r % 2 + g % 2 + b % 2 + w % 2
	if nodd == 2:
		print('No')
	elif nodd <= 1:
		print('Yes')
	elif r == 0 or g == 0 or b == 0:
		print('No')
	else:
		print('Yes')


mod = 10 ** 9 + 7

def solve():
	(r, g, b, w) = map(int, input().split())
	ok = False
	for i in range(20):
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			ok = True
		mn = min(r, g, b, 1)
		r -= mn
		g -= mn
		b -= mn
		w += 3 * mn
	print('Yes' if ok else 'No')
t = 1
t = int(input())
for _ in range(t):
	solve()


for j in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	arr = [r, g, b]
	count = 0
	for i in arr:
		if i % 2 == 0:
			count += 1
	if 0 in arr:
		if w % 2 == 0:
			count += 1
		if count >= 3:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if w % 2 == 0:
		if count == 1:
			print('No')
			continue
		else:
			print('Yes')
			continue
	elif count == 2:
		print('No')
		continue
	else:
		print('Yes')
		continue


import collections
from functools import lru_cache

def read():
	return input().strip()

def readInt():
	return int(input().strip())

def readList():
	return list(map(int, input().strip().split()))

def solve(r, g, b, w):
	oddsRGB = int(r & 1) + int(g & 1) + int(b & 1)
	oddsW = int(w & 1)
	return oddsRGB + oddsW <= 1 or (min(r, g, b) > 0 and 3 - oddsRGB + (oddsW ^ 1) <= 1)
t = readInt()
for i in range(t):
	(r, g, b, w) = readList()
	print('Yes' if solve(r, g, b, w) else 'No')


ts = int(input())
for t in range(ts):
	l = [int(i) for i in input().split(' ')]
	ol = [i % 2 for i in l]
	s = sum(ol)
	if s <= 1:
		print('YES')
	elif s == 2:
		print('NO')
	elif 0 in l[:3]:
		print('NO')
	else:
		print('YES')


t = int(input())

def check(l):
	for i in range(3):
		if l[i] < 0:
			return False
	if l[0] & 1 | l[1] & 1 | l[2] & 1 == 0:
		return True
	if (l[2] & 1) + (l[1] & 1) + (l[0] & 1) == 1 and l[3] & 1 == 0:
		return True
	return False
for _ in range(t):
	l = list(map(int, input().split()))
	if check(l):
		print('Yes')
		continue
	for i in range(3):
		l[i] -= 1
	l[3] += 3
	if check(l):
		print('Yes')
		continue
	print('No')


for _ in range(int(input())):
	r = list(map(int, input().split()))
	(odd, even) = (0, 0)
	flag = True
	if min(r[0], r[1], r[2]) == 0:
		for j in range(4):
			if r[j] % 2:
				odd += 1
			if r[j] % 2 == 0:
				even += 1
		if odd == 1 or even == 4:
			flag = True
		else:
			flag = False
	else:
		for j in range(3):
			if r[j] % 2:
				odd += 1
			if r[j] % 2 == 0:
				even += 1
		if flag:
			if odd == 2 and even == 1 and (r[-1] % 2 == 0):
				flag = False
			if even == 2 and odd == 1 and (r[-1] % 2 != 0):
				flag = False
	if flag:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	t = 0
	t += (r & 1) + (g & 1) + (b & 1)
	if t & 1:
		if t == 3:
			print('Yes')
		elif w & 1:
			print('No')
		else:
			print('Yes')
	elif t == 0:
		print('Yes')
	elif w & 1 and min([r, g, b]) != 0:
		print('Yes')
	else:
		print('No')


class balls:

	def __init__(self, r, g, b, w):
		self.r = r
		self.g = g
		self.b = b
		self.w = w

	def check(self):
		if self.r % 2 + self.g % 2 + self.b % 2 + self.w % 2 > 1:
			return 0
		else:
			return 1

	def op(self):
		if self.r > 0 and self.b > 0 and (self.g > 0):
			return balls(self.r - 1, self.g - 1, self.b - 1, self.w + 1)
		else:
			return self
i = int(input())
for k in range(i):
	(r, g, b, w) = input().split(' ')
	p = balls(int(r), int(g), int(b), int(w))
	if p.check() or p.op().check():
		print('Yes')
	else:
		print('No')


import sys, math
input = sys.stdin.readline
t = int(input())
for rr in range(t):
	(r, g, b, w) = map(int, input().split())
	odd = 0
	even = 0
	l = [r, g, b, w]
	for i in l:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd <= 1:
		print('Yes')
	else:
		flag = False
		if r > 0 and g > 0 and (b > 0):
			l[0] -= 1
			l[1] -= 1
			l[2] -= 1
			l[3] += 3
		o = 0
		e = 0
		for i in l:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if o <= 1:
			print('Yes')
		else:
			print('No')


n = int(input())
Ans = []
for _ in range(0, n):
	A = [int(i) for i in input().split()]
	m = 0
	if A[0] % 2 == 0:
		m += 1
	if A[1] % 2 == 0:
		m += 1
	if A[2] % 2 == 0:
		m += 1
	if A[3] % 2 == 0:
		m += 1
	if m == 3 or m == 4:
		Ans.append('Yes')
	elif m == 0 or m == 1:
		if A[0] > 0 and A[1] > 0 and (A[2] > 0):
			Ans.append('Yes')
		else:
			Ans.append('No')
	else:
		Ans.append('No')
print('\n'.join(Ans))


test = int(input())

def fun(a):
	found1 = 0
	count = 0
	for i in a:
		if i % 2 == 0:
			count += 1
	if count == len(a) or count == len(a) - 1:
		print('YES')
		found1 = 1
	return found1
for i in range(0, test):
	a = list(map(int, input().split()))
	a1 = a[:3]
	set1 = set(a)
	count = 0
	found = 0
	if len(a) == 0 or len(a) == 1:
		print('YES')
		continue
	elif len(set1) == 1:
		print('YES')
		continue
	else:
		if a[0] == a[3] and a[1] == [2]:
			print('YES')
			continue
		found = fun(a)
		min1 = min(a1)
		if found == 0 and min1 != 0:
			temp = a[:]
			temp[0] -= 1
			temp[1] -= 1
			temp[2] -= 1
			temp[3] += 3
			found = fun(temp)
			if found == 1:
				continue
		if found == 0:
			print('NO')


def isPalyndrome(r, g, b, w):
	pairs = 0
	if r % 2 == 0:
		pairs += 1
	if g % 2 == 0:
		pairs += 1
	if b % 2 == 0:
		pairs += 1
	if w % 2 == 0:
		pairs += 1
	if pairs >= 3:
		return True
	return False
n = int(input())
outputs = []
for i in range(0, n):
	(r, g, b, w) = map(int, input().split())
	output = 'NO'
	if isPalyndrome(r, g, b, w):
		output = 'YES'
	elif r > 0 and g > 0 and (b > 0):
		(r, g, b, w) = (r - 1, g - 1, b - 1, w + 3)
		if isPalyndrome(r, g, b, w):
			output = 'YES'
	outputs.append(output)
for output in outputs:
	print(output)


t = int(input())
for i in range(t):
	s = input()
	k = s.split()
	a = int(k[0])
	b = int(k[1])
	c = int(k[2])
	d = int(k[3])
	if a != 0 and b != 0 and (c != 0):
		if a % 2 == 1:
			sa = 1
		else:
			sa = 0
		if b % 2 == 1:
			sb = 1
		else:
			sb = 0
		if c % 2 == 1:
			sc = 1
		else:
			sc = 0
		if d % 2 == 1:
			sd = 1
		else:
			sd = 0
		if sa + sb + sc + sd == 2:
			print('No')
		else:
			print('Yes')
	else:
		if a % 2 == 1:
			sa = 1
		else:
			sa = 0
		if b % 2 == 1:
			sb = 1
		else:
			sb = 0
		if c % 2 == 1:
			sc = 1
		else:
			sc = 0
		if d % 2 == 1:
			sd = 1
		else:
			sd = 0
		if sa + sb + sc + sd == 0 or sa + sb + sc + sd == 1:
			print('Yes')
		else:
			print('No')


import sys
import os.path
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
	sys.stdout = open('out.txt', 'w')
for _ in range(int(input())):
	li = list(map(int, input().split()))
	li2 = [li[0] - 1, li[1] - 1, li[2] - 1, li[3] + 3]
	x = 0
	for i in li2:
		if i < 0:
			x += 1
	li2[-1] -= x
	for i in range(3):
		if li[i] == 0:
			li2 = li
			break
	(l, l2) = ([], [])
	for i in li:
		if i > 0:
			l.append(i % 2)
	for i in li2:
		if i > 0:
			l2.append(i % 2)
	if len(l) == 0 or len(l2) == 0:
		print('Yes')
	elif l.count(1) <= 1 or l2.count(1) <= 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	count_odd = 0
	count_even = 0
	if r % 2 == 1:
		count_odd += 1
	else:
		count_even += 1
	if g % 2 == 1:
		count_odd += 1
	else:
		count_even += 1
	if b % 2 == 1:
		count_odd += 1
	else:
		count_even += 1
	if w % 2 == 1:
		count_odd += 1
	else:
		count_even += 1
	if count_odd <= 1:
		print('Yes')
	elif r == 0 or g == 0 or b == 0:
		print('No')
	else:
		r -= 1
		g -= 1
		b -= 1
		w += 3
		count_odd = 0
		count_even = 0
		if r % 2 == 1:
			count_odd += 1
		else:
			count_even += 1
		if g % 2 == 1:
			count_odd += 1
		else:
			count_even += 1
		if b % 2 == 1:
			count_odd += 1
		else:
			count_even += 1
		if w % 2 == 1:
			count_odd += 1
		else:
			count_even += 1
		if count_odd <= 1:
			print('Yes')
		else:
			print('No')


t = int(input())
while t > 0:
	l = [int(x) for x in input().split()]
	c = 0
	for i in l:
		c += i % 2
	if 0 <= c <= 1:
		print('Yes')
	elif l[0] != 0 and l[1] != 0 and (l[2] != 0):
		c = 0
		r = l[0] - 1
		g = l[1] - 1
		b = l[2] - 1
		w = l[3] + 3
		c += r % 2
		c += g % 2
		c += b % 2
		c += w % 2
		if 0 <= c <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')
	t -= 1


T = int(input())
for _ in range(T):
	(r, g, b, w) = [int(i) for i in input().split()]
	count = 0
	_min = min(r, g, b)
	flag = 0
	count = 0
	if r % 2 == 1:
		count += 1
	if g % 2 == 1:
		count += 1
	if b % 2 == 1:
		count += 1
	if w % 2 == 1:
		count += 1
	if count <= 1:
		print('Yes')
		flag = 1
		continue
	if _min == 0:
		print('No')
		continue
	_min -= 1
	r -= 1
	g -= 1
	b -= 1
	w += 3
	count = 0
	if r % 2 == 1:
		count += 1
	if g % 2 == 1:
		count += 1
	if b % 2 == 1:
		count += 1
	if w % 2 == 1:
		count += 1
	if count <= 1:
		print('Yes')
		flag = 1
		continue
	if flag == 0:
		print('No')


def answer(r, g, b, w):
	mini = min(r, g, b)
	l = [r, g, b, w]
	count = 0
	for i in l:
		if i % 2 != 0:
			count += 1
	if count <= 1 or count == 4:
		return 'YES'
	if mini == 0:
		return 'NO'
	if count == 3:
		return 'YES'
	if count == 2:
		return 'NO'
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	print(answer(r, g, b, w))


import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	(a, b, c, d) = rm()
	(a, b, c, d) = (d, a, b, c)
	mini = min([b, c, d])
	n = min(mini + 1, 3)
	ans = False
	for i in range(n):
		odd = 0
		even = 0
		if (a + 3 * i) % 2 == 0:
			even += 1
		else:
			odd += 1
		for j in [b, c, d]:
			if (j - i) % 2 == 0:
				even += 1
			else:
				odd += 1
		if odd == 1 or odd == 0:
			ans = True
	if ans:
		print('Yes')
	else:
		print('No')


T = int(input())
for z in range(T):
	(r, g, b, w) = [int(x) for x in input().split()]
	count = 4
	if r == 0:
		count -= 1
	if g == 0:
		count -= 1
	if b == 0:
		count -= 1
	if w == 0:
		count -= 1
	rem = r % 2 + g % 2 + b % 2 + w % 2
	if rem == 0:
		print('Yes')
	elif rem == 4:
		print('Yes')
	elif rem == 1:
		print('Yes')
	elif rem == 2:
		print('No')
	elif rem == 3:
		if count == 3:
			if w == 0:
				print('Yes')
			else:
				print('No')
		elif w % 2 == 0:
			print('Yes')
		else:
			print('Yes')


def Check(r, g, b, w):
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		return True
	elif r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		return True
	elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0):
		return True
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0):
		return True
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 1):
		return True
	elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 1) and (min(r, g, b) > 0):
		return True
	elif r % 2 == 0 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 1) and (min(r, g, b) > 0):
		return True
	elif r % 2 == 1 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 1) and (min(r, g, b) > 0):
		return True
	elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 1) and (min(r, g, b) > 0):
		return True
	elif r % 2 == 1 and g % 2 == 1 and (b % 2 == 1) and (w % 2 == 0) and (min(r, g, b) > 0):
		return True
	else:
		return False
T = int(input())
for i in range(T):
	(r, g, b, w) = map(int, input().split())
	if Check(r, g, b, w):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	count = 0
	if r % 2 != 0:
		count += 1
	if g % 2 != 0:
		count += 1
	if b % 2 != 0:
		count += 1
	if count == 3:
		print('YES')
		continue
	if count == 0:
		print('YES')
		continue
	mini = min(r, g, b)
	if mini == 0:
		if count > 1:
			print('NO')
			continue
	if count == 1 and w % 2 == 0:
		print('YES')
		continue
	if count == 2 and (w + 3) % 2 == 0:
		print('YES')
		continue
	print('NO')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	r = a % 2 + b % 2 + c % 2 + d % 2
	if r <= 1:
		print('YES')
	elif r > 2 and (a != 0 and b != 0 and (c != 0)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	counts = [r, g, b, w]
	odds = [r % 2, g % 2, b % 2, w % 2]
	if odds.count(1) in (1, 0, 4):
		print('YES')
	elif odds.count(1) == 3 and r and g and b:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	a = input().split()
	a = [int(x) for x in a]
	e = 0
	o = 0
	for j in a:
		if j % 2 == 0:
			e += 1
		else:
			o += 1
	if o <= 1:
		print('Yes')
	elif 0 in a[:-1]:
		if o > 1:
			print('No')
		else:
			print('Yes')
	elif o == 2:
		print('No')
	else:
		print('Yes')


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	(r, g, b, w) = list(map(int, stdin.readline().rstrip().split()))
	mi = min(r, g, b)
	o = []
	if r % 2 == 1:
		o.append('r')
	if g % 2 == 1:
		o.append('g')
	if b % 2 == 1:
		o.append('b')
	chk = False
	if r == 0 or g == 0 or b == 0:
		chk = True
	if len(o) == 0:
		print('Yes')
		continue
	else:
		odc = len(o) + w % 2
		if odc == 1 or odc == 0:
			print('Yes')
			continue
		elif (odc == 3 or odc == 4) and (not chk):
			print('Yes')
		else:
			print('No')


def solve(l):
	count = 0
	for i in l:
		if i % 2 == 1:
			count += 1
	if count <= 1:
		return 'Yes'
	if l[0] == 0 or l[1] == 0 or l[2] == 0:
		return 'No'
	l2 = [l[0] - 1, l[1] - 1, l[2] - 1, l[3] - 1]
	count = 0
	for i in l2:
		if i % 2 == 1:
			count += 1
	if count <= 1:
		return 'Yes'
	return 'No'
for _ in range(int(input())):
	l = list(map(int, input().split()))
	print(solve(l))


num_cases = int(input())

def do_case() -> bool:
	(r, g, b, w) = map(int, input().split())
	num_odd = (r & 1) + (g & 1) + (b & 1) + (w & 1)
	if num_odd == 0 or num_odd == 1 or num_odd == 4:
		return True
	if num_odd == 2:
		return False
	return 0 not in (r, g, b)
for case_num in range(num_cases):
	print('Yes' if do_case() else 'No')


import bisect
import copy
import fractions
import heapq
import math
import random
import sys
T = int(input())
for t in range(T):
	(R, G, B, W) = tuple(map(int, input().split()))
	RGB = R % 2 + G % 2 + B % 2
	W_ = W % 2
	if RGB + W_ < 2:
		print('Yes')
	elif RGB + W_ == 2:
		print('No')
	elif R > 0 and G > 0 and (B > 0):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for i in l:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == even:
		print('No')
	elif odd > 1:
		if l[0] == 0 or l[1] == 0 or l[2] == 0:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def print_list(l):
	print(' '.join(map(str, l)))
for _ in range(N()):
	a = RLL()
	z = 0
	j = 0
	for i in a[:3]:
		if i == 0:
			z += 1
		if i & 1:
			j += 1
	if z == 3:
		print('YES')
	elif z == 2:
		tmp = j + (a[3] & 1)
		if tmp == 2:
			print('NO')
		else:
			print('YES')
	elif z == 1:
		tmp = j + (a[3] & 1)
		if tmp > 1:
			print('NO')
		else:
			print('YES')
	else:
		tmp = 0
		for i in a:
			if i & 1:
				tmp += 1
		if tmp == 2:
			print('NO')
		else:
			print('YES')


tests = int(input())
for t in range(tests):
	(r, g, b, w) = list(map(int, input().split()))
	count = 0
	count_ls = []
	if r % 2 == 0:
		count += 1
		count_ls.append(r)
	if g % 2 == 0:
		count += 1
		count_ls.append(g)
	if b % 2 == 0:
		count += 1
		count_ls.append(b)
	if count == 3:
		print('Yes')
	elif count == 2:
		if w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif count == 1:
		if w % 2 == 0:
			print('No')
		elif count_ls[0] > 0:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(r, g, b, w) = MAP()
	for i in range(2):
		C = [0] * 2
		C[r & 1] += 1
		C[g & 1] += 1
		C[b & 1] += 1
		C[w & 1] += 1
		if C[1] <= 1:
			Yes()
			break
		if r == 0 or g == 0 or b == 0:
			No()
			break
		r -= 1
		g -= 1
		b -= 1
		w += 3
	else:
		No()


t = int(input())
for ikk in range(t):
	(r, g, b, w) = map(int, input().strip().split())
	if r * g * b != 0:
		if w % 2 == 1:
			even_count = 0
			if r % 2 == 0:
				even_count += 1
			if g % 2 == 0:
				even_count += 1
			if b % 2 == 0:
				even_count += 1
			if even_count == 2:
				print('No')
			else:
				print('Yes')
		else:
			even_count = 0
			if r % 2 == 0:
				even_count += 1
			if g % 2 == 0:
				even_count += 1
			if b % 2 == 0:
				even_count += 1
			if even_count == 1:
				print('No')
			else:
				print('Yes')
	else:
		odd_count = 0
		if r % 2 == 1:
			odd_count += 1
		if g % 2 == 1:
			odd_count += 1
		if b % 2 == 1:
			odd_count += 1
		if w % 2 == 1:
			odd_count += 1
		if odd_count > 1:
			print('No')
		else:
			print('Yes')


for i in range(int(input())):
	ball = input()
	ball = ball.split(' ')
	balls = []
	e_count = 0
	o_count = 0
	for i in ball:
		i = int(i)
		balls.append(i)
	red = balls[0]
	green = balls[1]
	blue = balls[2]
	white = balls[3]
	for i in balls:
		if i % 2 == 0:
			e_count += 1
		if i % 2 == 1:
			o_count += 1
	if e_count >= 3:
		print('Yes')
	elif o_count >= 3 and red >= 1 and (green >= 1) and (blue >= 1):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	if sum(l) % 2 == 0:
		temp = 0
		e = 0
		o = 0
		for i in l:
			if i % 2 == 1:
				o += 1
			else:
				e += 1
		if e == 0 or e == 4:
			print('Yes')
		else:
			print('No')
	else:
		(r, g, b, w) = l
		o = 0
		e = 0
		for i in l:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if o == 1:
			print('Yes')
		elif o == 3:
			if 0 not in l or w == 0:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	c = 0
	f = 0
	for i in l:
		if i % 2 == 0:
			c += 1
		else:
			f += 1
	if c >= 3:
		print('Yes')
	elif f >= 3 and (0 not in l or l[-1] == 0):
		print('Yes')
	else:
		print('No')


def num_odd(r, g, b, w):
	c = 0
	if r % 2 == 1:
		c += 1
	if g % 2 == 1:
		c += 1
	if b % 2 == 1:
		c += 1
	if w % 2 == 1:
		c += 1
	return c
t = int(input())
for i in range(t):
	(r, g, b, w) = [int(i) for i in input().split()]
	if num_odd(r, g, b, w) > 1:
		if r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 3
		if num_odd(r, g, b, w) > 1:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


t = int(input())
while t > 0:
	t -= 1
	balls = list(map(int, input().strip().split()))
	while True:
		odds = 0
		for ele in balls:
			if ele % 2 == 1:
				odds += 1
		if odds > 1:
			balls[0] -= 1
			balls[1] -= 1
			balls[2] -= 1
			balls[3] += 3
			odds = 0
			flag = 0
			for ele in balls:
				if ele < 0:
					flag = 1
					break
				if ele % 2 == 1:
					odds += 1
			if odds > 1 or flag:
				print('No')
				break
			else:
				print('Yes')
				break
		else:
			print('Yes')
			break


def no_checker(p):
	even = odd = 0
	for i in p:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	return (even, odd)
for _ in range(int(input())):
	a = list((int(x) for x in input().split()))
	g = no_checker(a)
	if a[0] * a[1] * a[2] == 0:
		if g[1] > 1:
			print('No')
		else:
			print('Yes')
	elif g[1] <= 1 or g[1] >= 3:
		print('Yes')
	else:
		print('No')


t = int(input())
for te in range(0, t):
	l = list(map(int, input().split()))
	r = l[0]
	g = l[1]
	b = l[2]
	w = l[3]
	pend = 0
	f = 0
	ro = r
	go = g
	bo = b
	wo = w
	if r & 1:
		pend += 1
	if g & 1:
		pend += 1
	if b & 1:
		pend += 1
	if w & 1:
		pend += 1
	if pend <= 1:
		print('Yes')
		f = 1
	else:
		mn = min(r, g, b)
		r -= mn
		g -= mn
		b -= mn
		w += 3 * mn
		cnt = 0
		if r & 1:
			cnt += 1
		if g & 1:
			cnt += 1
		if b & 1:
			cnt += 1
		if w % 2 == 0 and cnt == 1:
			print('Yes')
			f = 1
		elif cnt == 0:
			print('Yes')
			f = 1
	if f == 0:
		r = ro
		b = bo
		g = go
		w = wo
		pend = 0
		mn = min(r, g, b)
		if mn > 0:
			r -= 1
			w += 3
			b -= 1
			g -= 1
		if r % 2 == 1:
			pend += 1
		if g % 2 == 1:
			pend += 1
		if b % 2 == 1:
			pend += 1
		if w % 2 == 1:
			pend += 1
		if pend <= 1:
			print('Yes')
			f = 1
		else:
			mn = min(r, g, b)
			r -= mn
			g -= mn
			b -= mn
			w += 3 * mn
			cnt = 0
			if r % 2 == 1:
				cnt += 1
			if g % 2 == 1:
				cnt += 1
			if b % 2 == 1:
				cnt += 1
			if cnt == 0:
				print('Yes')
				f = 1
			elif w % 2 == 0 and cnt == 1:
				print('Yes')
				f = 1
			else:
				print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = (int(x) for x in input().split())
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		print('Yes')
	elif r == 0 or b == 0 or g == 0:
		print('No')
	else:
		x = min(r, g, b)
		if x % 2 == 1:
			pass
		else:
			x = x - 1
		r -= x
		g -= x
		b -= x
		w += 3 * x
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			print('Yes')
		else:
			print('No')


from sys import stdin, stdout
q = int(input())
for i in range(q):
	(r, b, g, w) = list(map(int, stdin.readline().split()))
	cnt = 0
	if r % 2 == 0:
		cnt += 1
	if g % 2 == 0:
		cnt += 1
	if b % 2 == 0:
		cnt += 1
	if w % 2 == 0:
		cnt += 1
	if cnt == 2:
		print('No')
	elif cnt == 1:
		if r != 0 and g != 0 and (b != 0):
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	c = [int(x) for x in input().split()]
	e = 0
	o = 0
	for i in range(4):
		if c[i] % 2 == 0:
			e += 1
		else:
			o += 1
	if e >= 3:
		print('YES')
	elif o >= 3 and (0 not in c or c[-1] == 0):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t = t - 1
	rgbw = list(map(int, input().split()))
	if len(set(rgbw)) == 1:
		print('Yes')
	else:
		eve = 0
		for i in rgbw:
			if i % 2 == 0:
				eve += 1
		if eve >= 3:
			print('Yes')
		elif eve == 2:
			print('No')
		elif eve == 1:
			if rgbw[0] == 0 or rgbw[1] == 0 or rgbw[2] == 0:
				print('No')
			else:
				eve = 0
				rgbw[0] = rgbw[0] - 1
				rgbw[1] = rgbw[1] - 1
				rgbw[2] = rgbw[2] - 1
				rgbw[3] = rgbw[3] + 3
				for i in rgbw:
					if i % 2 == 0:
						eve += 1
				if eve >= 3:
					print('Yes')
				elif eve == 2 or eve == 1:
					print('No')
				else:
					print('Yes')
		else:
			print('Yes')


T = int(input())
for t in range(T):
	(r, g, b, w) = map(int, input().split())
	ans = 'No'
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) or (r % 2 == 0 and g % 2 == 0 and (w % 2 == 0)) or (r % 2 == 0 and w % 2 == 0 and (b % 2 == 0)) or (w % 2 == 0 and g % 2 == 0 and (b % 2 == 0)):
		ans = 'Yes'
	if r > 0 and b > 0 and (g > 0):
		r -= 1
		b -= 1
		g -= 1
		w += 3
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) or (r % 2 == 0 and g % 2 == 0 and (w % 2 == 0)) or (r % 2 == 0 and w % 2 == 0 and (b % 2 == 0)) or (w % 2 == 0 and g % 2 == 0 and (b % 2 == 0)):
			ans = 'Yes'
	print(ans)


for _ in range(int(input())):
	a = [int(i) for i in input().split()]
	s = 0
	if a[0] % 2:
		s += 1
	if a[1] % 2:
		s += 1
	if a[2] % 2:
		s += 1
	if a[3] % 2:
		s += 1
	if s == 1 or s == 4 or s == 0:
		print('Yes')
	elif s == 3:
		if 0 in a[:-1]:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


T = int(input())
while T > 0:
	(r, g, b, w) = map(int, input().split())
	count = 0
	if r % 2 == 1:
		count += 1
	if g % 2 == 1:
		count += 1
	if b % 2 == 1:
		count += 1
	if w % 2 == 1:
		count += 1
	if count <= 1:
		print('YES')
	elif r > 0 and g > 0 and (b > 0):
		r -= 1
		if r % 2 == 0:
			count -= 1
		else:
			count += 1
		g -= 1
		if g % 2 == 0:
			count -= 1
		else:
			count += 1
		b -= 1
		if b % 2 == 0:
			count -= 1
		else:
			count += 1
		w += 3
		if w % 2 == 0:
			count -= 1
		else:
			count += 1
		if count <= 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')
	T -= 1


t = int(input())
for _ in range(t):
	lst = [int(ele) for ele in input().split()]
	(r, g, b, w) = lst
	lst.pop()
	odd = 0
	eve = 0
	zero = 0
	for ele in lst:
		if ele == 0:
			zero += 1
		elif ele % 2 == 1:
			odd += 1
		else:
			eve += 1
	evez = eve + zero
	if odd == 1 and w % 2 == 1:
		print('NO')
	elif odd == 2 and w % 2 == 0:
		print('NO')
	elif odd == 2 and w % 2 == 1 and (zero != 0):
		print('NO')
	else:
		print('YES')


n = int(input())
list_cases = []
for i in range(n):
	x = list(input().split())
	list_cases.append(x)
for i in range(n):
	d = 0
	count = 0
	for j in range(4):
		if int(list_cases[i][j]) % 2 == 0:
			count += 1
	if int(list_cases[i][0]) == 0 or int(list_cases[i][1]) == 0 or int(list_cases[i][2]) == 0:
		d += 1
	if count == 4 or count == 0 or count == 3:
		print('Yes')
	elif count == 2:
		print('No')
	elif d == 1:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	ans = r % 2 + g % 2 + b % 2 + w % 2
	if r > 0 and g > 0 and (b > 0):
		if ans != 2:
			print('Yes')
		else:
			print('No')
		continue
	elif ans == 0 or ans == 1:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
for _ in range(inp()):
	x = ip()
	flag = 0
	for i in range(min(4, min(x[:-1])) + 1):
		(o, e) = (0, 0)
		for j in range(4):
			if x[j] % 2:
				o += 1
			else:
				e += 1
		if o <= 1:
			flag = 1
			break
		for j in range(3):
			x[j] -= 1
		x[-1] += 3
	if flag:
		print('YES')
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
from collections import Counter, defaultdict
from collections import deque
from functools import cmp_to_key
import math

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		l = ain()
		c = 0
		for i in l:
			if i % 2 == 0:
				c += 1
		if c > 2:
			print('Yes')
		else:
			x = min(l[0:3])
			if x == 0:
				print('No')
			else:
				l[0] -= 1
				l[1] -= 1
				l[2] -= 1
				l[3] += 3
				c = 0
				for i in l:
					if i % 2 == 0:
						c += 1
				if c > 2:
					print('Yes')
				else:
					print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if os.getcwd() == 'D:\\code':
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
input = sys.stdin.readline

def e(a):
	c = 0
	for i in range(4):
		if a[i] % 2 == 0:
			c += 1
	return c
for _ in range(int(input())):
	f = 0
	a = list(map(int, input().split()))
	c = e(a)
	if c > 2:
		f = 1
	if c < 2:
		if min(a[:3]) > 0:
			f = 1
	if f:
		print('YES')
	else:
		print('NO')


import sys, math
from collections import Counter, deque, defaultdict
input = sys.stdin.readline
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input()
C = lambda : input().strip().split()
mod = 1000000007

def pl(a):
	print(' '.join(list(map(str, a))))

def check(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 < 2:
		return 'Yes'
	else:
		return 'No'

def solve():
	(r, g, b, w) = M()
	if r * g * b == 0:
		print(check(r, g, b, w))
	elif check(r, g, b, w) == 'Yes' or check(r - 1, g - 1, b - 1, w + 3) == 'Yes':
		print('Yes')
	else:
		print('No')
for _ in range(I()):
	solve()


t = int(input())

def ckeven(c):
	if c % 2 == 0:
		return True
	else:
		return False
while t:
	t -= 1
	(r, g, b, w) = map(int, input().split())
	if r == 0 or g == 0 or b == 0:
		cnt = 0
		cnt += not ckeven(r)
		cnt += not ckeven(g)
		cnt += not ckeven(b)
		cnt += not ckeven(w)
		if cnt >= 2:
			print('No')
		else:
			print('Yes')
		continue
	r = ckeven(r)
	g = ckeven(g)
	b = ckeven(b)
	w = ckeven(w)
	if r and g and b and w:
		print('Yes')
		continue
	if r and g and (not b) and w or (r and (not g) and b and w) or (not r and g and b and w) or (r and g and b and (not w)):
		print('Yes')
		continue
	if r and (not g) and (not b) and (not w) or (not r and g and (not b) and (not w)) or (not r and (not g) and b and (not w)) or (not r and (not g) and (not b)):
		print('Yes')
		continue
	print('No')


def fn(r, g, b, w):
	cnt = r % 2 + g % 2 + b % 2 + w % 2
	if cnt == 4:
		return 'Yes'
	if cnt == 3:
		return 'Yes' if r and g and b else 'No'
	if cnt == 2:
		return 'No'
	if cnt == 1:
		return 'Yes'
	if cnt == 0:
		return 'Yes'
n = int(input())
for i in range(n):
	(r, g, b, w) = (int(x) for x in input().split())
	ans = fn(r, g, b, w)
	print(ans)


def even_count(l):
	ans = 0
	for x in l:
		if x % 2 == 0:
			ans += 1
	return ans
for t in range(int(input())):
	l = [int(x) for x in input().split()]
	min_abc = min(l[:3])
	m = [l[0] - 1, l[1] - 1, l[2] - 1, l[3] + 3] if min_abc != 0 else l
	if even_count(l) in [3, 4] or even_count(m) in [3, 4]:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	l = [a, b, c, d]
	o = 0
	for i in l:
		if i % 2:
			o += 1
	if o <= 1:
		print('Yes')
	else:
		a -= 1
		b -= 1
		c -= 1
		if not (a >= 0 and b >= 0 and (c >= 0)):
			print('No')
			continue
		d += 3
		l = [a, b, c, d]
		o = 0
		for i in l:
			if i % 2:
				o += 1
		if o <= 1:
			print('Yes')
		else:
			print('No')


testCases = int(input())
tests = []

def solver(case):
	oddCounter = 0
	for x in case:
		if x % 2 == 1:
			oddCounter += 1
	if oddCounter <= 1:
		return 'Yes'
	elif oddCounter == 2:
		return 'No'
	elif any((x == 0 for x in case[:-1])):
		return 'No'
	else:
		return 'Yes'
for x in range(testCases):
	newCase = [int(n) for n in input().split(' ')]
	print(solver(newCase))


def ColorBalls(b):
	return False if b[0] % 2 + b[1] % 2 + b[2] % 2 + b[3] % 2 > 1 else True
testcases = int(input())
for i in range(testcases):
	(r, g, b, w) = map(int, input().split())
	if ColorBalls([r, g, b, w]):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and ColorBalls([r - 1, g - 1, b - 1, w + 1]):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	odd = 0
	arr = [r, g, b, w]
	for i in arr:
		if i % 2 == 1:
			odd += 1
	if odd <= 1:
		print('Yes')
		continue
	if r >= 1 and g >= 1 and (b >= 1):
		r -= 1
		g -= 1
		b -= 1
		w += 1
		arr = [r, g, b, w]
		odd = 0
		for i in arr:
			if i % 2 == 1:
				odd += 1
		if odd <= 1:
			print('Yes')
			continue
	print('No')


import sys
ii = lambda : sys.stdin.readline().strip()
idata = lambda : [int(x) for x in ii().split()]

def main():
	(r, g, b, w) = idata()
	if r == 0 or g == 0 or b == 0:
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 1) or (r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0)) or (r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0)) or (r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0)) or (r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0)):
			print('YES')
		else:
			print('NO')
		return
	(r1, g1, b1, w1) = (r - 1, g - 1, b - 1, w + 3)
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 1) or (r % 2 == 0 and g % 2 == 0 and (b % 2 == 1) and (w % 2 == 0)) or (r % 2 == 0 and g % 2 == 1 and (b % 2 == 0) and (w % 2 == 0)) or (r % 2 == 1 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0)) or (r1 % 2 == 0 and g1 % 2 == 0 and (b1 % 2 == 0) and (w1 % 2 == 1)) or (r1 % 2 == 0 and g1 % 2 == 0 and (b1 % 2 == 1) and (w1 % 2 == 0)) or (r1 % 2 == 0 and g1 % 2 == 1 and (b1 % 2 == 0) and (w1 % 2 == 0)) or (r1 % 2 == 1 and g1 % 2 == 0 and (b1 % 2 == 0) and (w1 % 2 == 0)) or (r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0)) or (r1 % 2 == 0 and g1 % 2 == 0 and (b1 % 2 == 0) and (w1 % 2 == 0)):
		print('YES')
	else:
		print('NO')
	return
for t in range(int(ii())):
	main()


for t in range(int(input())):
	a = list(map(int, input().split()))
	cnt = 0
	for i in a:
		if i % 2 != 0:
			cnt += 1
	if cnt <= 1:
		print('Yes')
		continue
	if min(a[0], a[1], a[2]) == 0:
		print('No')
		continue
	for i in range(3):
		a[i] -= 1
	a[3] += 3
	cnt = 0
	for i in a:
		if i % 2 != 0:
			cnt += 1
	if cnt <= 1:
		print('Yes')
		continue
	else:
		print('No')


def readGenerator():
	while True:
		tokens = input().split(' ')
		for t in tokens:
			yield t
reader = readGenerator()

def readWord():
	return next(reader)

def readInt():
	return int(next(reader))

def readFloat():
	return float(next(reader))

def readLine():
	return input()

def solve(n):
	return n
tests = readInt()
for _ in range(0, tests):
	rgb = [readInt(), readInt(), readInt()]
	w = readInt()
	rgb.append(w)
	if len(list(filter(lambda x: x % 2 != 0, rgb))) < 2:
		print('Yes')
		continue
	rgb = rgb[0:3]
	m = min(min(rgb), 1)
	rgb = list(map(lambda x: x - m, rgb))
	w += m * 3
	rgb.append(w)
	if len(list(filter(lambda x: x % 2 != 0, rgb))) < 2:
		print('Yes')
		continue
	rgb = rgb[0:3]
	m = min(rgb)
	rgb = list(map(lambda x: x - m, rgb))
	w += m * 3
	rgb.append(w)
	if len(list(filter(lambda x: x % 2 != 0, rgb))) < 2:
		print('Yes')
		continue
	print('No')


def solve():
	arr = [int(v) for v in input().split()]
	(r, g, b, w) = arr
	pd = [v % 2 for v in arr]
	if sum(pd) <= 1:
		print('Yes')
		return
	if all((v != 0 for v in arr[:3])):
		pd = [v ^ 1 for v in pd]
	if sum(pd) <= 1:
		print('Yes')
		return
	print('No')
t = int(input())
for _ in range(t):
	solve()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	a = [r, g, b, w]
	c = 0
	for i in a:
		c += i % 2
	if c <= 1:
		print('Yes')
	else:
		if r > 0 and g > 0 and (b > 0):
			r -= 1
			g -= 1
			b -= 1
			w += 1
		c = 0
		a = [r, g, b, w]
		for i in a:
			c += i % 2
		if c <= 1:
			print('Yes')
		else:
			print('No')


(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, dgraphs, mod) = (lambda : sorted(zz()), {}, 10 ** 9 + 7)
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
num = int(z())
for _ in range(num):
	(r, g, b, w) = zz()
	l = (r, g, b, w)
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		print('Yes')
		continue
	t = min(l[:-1])
	if t >= 1:
		r -= 1
		g -= 1
		b -= 1
		w += 3
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		print('Yes')
		continue
	else:
		print('No')


def palindrome(r, g, b, w):
	lst = [r, g, b, w]
	odd = 0
	for i in range(4):
		if lst[i] % 2 == 1:
			odd += 1
	if odd == 2:
		return 'No'
	return 'Yes'
result = []
t = int(input())
for i in range(t):
	line = input().split()
	r = int(line[0])
	g = int(line[1])
	b = int(line[2])
	w = int(line[3])
	lst = [r, g, b, w]
	odd = 0
	for i in range(4):
		if lst[i] % 2 == 1:
			odd += 1
	if odd < 2:
		result.append('Yes')
	elif r == 0 or g == 0 or b == 0:
		result.append('No')
	elif w % 2 == 1 and odd > 2:
		result.append('Yes')
	elif w % 2 == 0 and odd == 3:
		result.append('Yes')
	else:
		result.append('No')
for i in range(t):
	print(result[i])


T = int(input())
count = 1
while count <= T:
	count += 1
	(r, g, b, w) = map(int, input().split())
	number = 0
	if r % 2 != 0:
		number += 1
	if g % 2 != 0:
		number += 1
	if b % 2 != 0:
		number += 1
	if w % 2 != 0:
		number += 1
	if number <= 1 or (r > 0 and g > 0 and (b > 0) and (number == 3)) or number == 4:
		print('Yes')
	else:
		print('No')


t = int(input())

def count(r, g, b, w):
	odds = 0
	if r % 2 != 0:
		odds += 1
	if g % 2 != 0:
		odds += 1
	if b % 2 != 0:
		odds += 1
	if w % 2 != 0:
		odds += 1
	return odds
for i in range(t):
	(r, g, b, w) = input().split()
	r = int(r)
	g = int(g)
	b = int(b)
	w = int(w)
	odds = count(r, g, b, w)
	if odds <= 1:
		print('Yes')
	elif min(r, g, b) > 0:
		r = r - 1
		g = g - 1
		b = b - 1
		w = w + 3
		odds = count(r, b, g, w)
		if odds <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def solve():
	arr = [int(i) for i in input().rstrip().split()]
	flip = 0
	original = 0
	original = sum((1 for i in arr if i % 2 != 0))
	if 0 not in arr[:3]:
		flip = 4 - original
	else:
		flip = original
	if flip <= 1 or original <= 1:
		print('YES')
	else:
		print('NO')

def main():
	tc = int(input().strip())
	for case in range(tc):
		solve()
main()


t = int(input())
i = 1
while i <= t:
	n = input()
	s = list(map(int, n.split()))
	r = s[0]
	b = s[1]
	g = s[2]
	w = s[3]
	l = [r % 2 == 0, b % 2 == 0, g % 2 == 0, w % 2 == 0]
	even = l.count(True)
	if w == 0 and r != 0 and (b != 0) and (g != 0):
		print('Yes')
	elif r == 0 or b == 0 or g == 0 or (w == 0):
		if even == 4 or even == 3:
			print('Yes')
		else:
			print('No')
	elif even == 4 or even == 1 or even == 3 or (even == 0):
		print('Yes')
	else:
		print('No')
	i += 1


import sys, math, cmath, time
start_time = time.time()

def solve():
	(r, g, b, w) = invr()
	q = [r % 2, g % 2, b % 2, w % 2]
	if q.count(0) >= 3:
		print('Yes')
	elif 0 not in [r, g, b] and q.count(1) >= 3:
		print('Yes')
	else:
		print('No')

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b

def factorial(n, m=1000000007):
	q = 1
	for i in range(n):
		q = q * (i + 1) % 1000000007
	return q
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


for _ in range(int(input())):
	(r, g, b, w) = [int(i) for i in input().split()]
	t = r % 2 + g % 2 + b % 2 + w % 2
	if 0 <= t <= 1 or (t >= 3 and 0 not in {r, g, b}):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if [i % 2 == 0 for i in (a, b, c, d)].count(0) <= 1:
		print('Yes')
	elif all((i > 0 for i in (a, b, c))):
		if [i % 2 == 0 for i in (a - 1, b - 1, c - 1, d + 1)].count(0) <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


x = int(input())
for _ in range(x):
	k = ''
	(r, g, b, w) = map(int, input().split())
	l = r % 2 + g % 2 + b % 2 + w % 2
	if l <= 1:
		print('yes')
	elif r * b * g > 0 and l >= 3:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	(r, b, g, w) = map(int, input().split())

	def count_num(r, b, g, w):
		global count
		count = 0
		if r % 2 != 0:
			count += 1
		if b % 2 != 0:
			count += 1
		if g % 2 != 0:
			count += 1
		if w % 2 != 0:
			count += 1
		return count

	def check():
		if r >= 0 and b >= 0 and (g >= 0) and (w >= 0):
			return True
		else:
			return False
	while check():
		if count_num(r, b, g, w) == 0 or count_num(r, b, g, w) == 1:
			print('Yes')
			break
		elif count == 2:
			print('No')
			break
		else:
			r = r - 1
			b = b - 1
			g = g - 1
			w = w + 3
			count_num(r, b, g, w)
	if check() == False:
		print('NO')


for p in range(int(input())):
	l = list(map(int, input().split()))
	(x, y) = (0, 0)
	for i in l:
		if i % 2:
			x += 1
		else:
			y += 1
	if y >= 3:
		print('Yes')
	elif y <= 1:
		if l[0] > 0 and l[1] > 0 and (l[2] > 0):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	for test in range(t):
		cbs = list(map(int, stdin.readline().split()))
		odd = 0
		mnm = min(cbs[:3])
		for i in range(4):
			if cbs[i] % 2 == 1:
				odd += 1
		if mnm == 0 and odd > 1:
			ans = 'No'
		elif odd > 1:
			odd = 0
			for i in range(3):
				cbs[i] -= 1
				if cbs[i] % 2 == 1:
					odd += 1
			cbs[3] += 3
			if cbs[3] % 2 == 1:
				odd += 1
			if odd > 1:
				ans = 'No'
			else:
				ans = 'Yes'
		else:
			ans = 'Yes'
		stdout.write('{}\n'.format(ans))
	return
main()


for _ in range(int(input())):
	a = list(map(int, input().split()))
	mn = min(a[0], a[1], a[2])
	odd = 0
	for item in a:
		if item & 1:
			odd += 1
	if odd < 2:
		print('Yes')
		continue
	if mn == 0:
		print('No')
		continue
	a[0] -= 1
	a[1] -= 1
	a[2] -= 1
	a[3] += 1
	odd = 0
	for item in a:
		if item & 1:
			odd += 1
	print('No' if odd > 1 else 'Yes')


t = int(input())
for you in range(t):
	l = input().split()
	r = int(l[0])
	g = int(l[1])
	b = int(l[2])
	w = int(l[3])
	if (r + g + b + w) % 2 == 0:
		if r % 2 == g % 2 and g % 2 == b % 2 and (b % 2 == w % 2):
			print('Yes')
		else:
			print('No')
	else:
		numofodds = 0
		numofeven = 0
		numofodds = numofodds + r % 2 + g % 2 + b % 2 + w % 2
		if numofodds == 1:
			print('Yes')
			continue
		if numofodds == 3:
			if w % 2 == 0:
				print('Yes')
				continue
			poss = 0
			if r % 2 == 0 and r > 0:
				poss = 1
			if b % 2 == 0 and b > 0:
				poss = 1
			if g % 2 == 0 and g > 0:
				poss = 1
			if poss:
				print('Yes')
			else:
				print('No')


def solve(r, g, b, w):
	balls = [r, g, b, w]
	odd = 0
	for i in range(4):
		if balls[i] % 2 != 0:
			odd += 1
	if 0 in balls[:3]:
		if odd >= 2:
			return 'No'
	if odd == 2:
		return 'No'
	return 'Yes'
for i in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	print(solve(r, g, b, w))


import sys
from sys import stdin
import math

def iinput():
	return int(input())

def minput():
	return map(int, input().split())

def linput():
	return list(map(int, input().split()))

def fiinput():
	return int(stdin.readline())

def fminput():
	return map(int, stdin.readline().strip().split())

def flinput():
	return list(map(int, stdin.readline().strip().split()))
for _ in range(iinput()):
	(a, b, c, d) = minput()
	c1 = 0
	c2 = 0
	if a % 2 == 0:
		c2 += 1
	else:
		c1 += 1
	if b % 2 == 0:
		c2 += 1
	else:
		c1 += 1
	if c % 2 == 0:
		c2 += 1
	else:
		c1 += 1
	if d % 2 == 0:
		c2 += 1
	else:
		c1 += 1
	if c1 == 0 or c1 == 1:
		print('Yes')
	elif a > 0 and b > 0 and (c > 0):
		a -= 1
		b -= 1
		c -= 1
		d += 3
		c1 = 0
		c2 = 0
		if a % 2 == 0:
			c2 += 1
		else:
			c1 += 1
		if b % 2 == 0:
			c2 += 1
		else:
			c1 += 1
		if c % 2 == 0:
			c2 += 1
		else:
			c1 += 1
		if d % 2 == 0:
			c2 += 1
		else:
			c1 += 1
		if c1 == 0 or c1 == 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
ans = []
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	c = r % 2 + g % 2 + b % 2 + w % 2
	if c > 1 and r != 0 and (g != 0) and (b != 0):
		c = (r - 1) % 2 + (g - 1) % 2 + (b - 1) % 2 + (w + 3) % 2
		if c > 1:
			ans.append('No')
		else:
			ans.append('Yes')
	elif c > 1:
		ans.append('No')
	else:
		ans.append('Yes')
for item in ans:
	print(item)


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	l1 = sorted([r, g, b])
	if l1[0] == 0:
		if l1[1] % 2 + l1[2] % 2 + w % 2 > 1:
			print('No')
		else:
			print('Yes')
	else:
		w += min(l1)
		l1 = [x - min(l1) for x in l1]
		critical = sum([x % 2 for x in l1])
		if critical == 0:
			print('Yes')
		elif critical == 1 and w % 2:
			print('No')
		elif critical == 1 and w % 2 == 0:
			print('Yes')
		elif critical == 2 and w % 2:
			print('Yes')
		elif critical == 2 and w % 2 == 0:
			print('No')


import sys
input = sys.stdin.buffer.readline

def solution():
	(r, g, b, w) = map(int, input().split())
	cnt = 0
	m = min(r, g, b)
	if r != 0 and g != 0 and (b != 0):
		r1 = r - 1
		g1 = g - 1
		b1 = b - 1
		w1 = w + 3
		if r1 % 2 == 0:
			cnt += 1
		if g1 % 2 == 0:
			cnt += 1
		if b1 % 2 == 0:
			cnt += 1
		if w1 % 2 == 0:
			cnt += 1
	cnt1 = 0
	if r % 2 == 0:
		cnt1 += 1
	if g % 2 == 0:
		cnt1 += 1
	if b % 2 == 0:
		cnt1 += 1
	if w % 2 == 0:
		cnt1 += 1
	s = r + g + b + w
	if cnt1 >= 3 or cnt >= 4 or cnt >= 3:
		print('YES')
	elif s == r or s == g or s == b:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	solution()


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	c3 = 0
	for k in range(len(l)):
		if l[k] % 2 == 0:
			c3 += 1
	if c3 >= 3:
		print('YES')
	else:
		(r, g, b, w) = l
		c = min(r, g, b)
		if c % 2 != 1:
			if c >= 1:
				c -= 1
		r -= c
		g -= c
		b -= c
		w += 3 * c
		(c1, c2) = (0, 0)
		if r % 2 == 0:
			c1 += 1
		else:
			c2 += 1
		if g % 2 == 0:
			c1 += 1
		else:
			c2 += 1
		if b % 2 == 0:
			c1 += 1
		else:
			c2 += 1
		if w % 2 == 0:
			c1 += 1
		else:
			c2 += 1
		if c1 >= 3:
			print('YES')
		else:
			print('NO')


from sys import stdin
input = stdin.readline

def help1():
	(n, k) = map(int, input().split(' '))
	arr = list(map(int, input().split(' ')))
	val = [[0] * (n + 1) for i in range(101)]
	for i in range(n):
		for j in range(1, 101):
			if j == arr[i]:
				val[j][i + 1] = val[j][i] + 1
			else:
				val[j][i + 1] = val[j][i]
	dp = [0] * (n + 7)
	for i in range(n):
		for j in range(i + 1):
			dp[i] = min(dp[i], dp[i - j] + val[i - j][i] + k)
	print(dp[n - 1])

def help():
	arr = list(map(int, input().split(' ')))
	mini = min(arr[:3])
	flag = False
	for i in range(4):
		arr[i] = arr[i] % 2
	if arr[3] == 1:
		if sum(arr[:3]) == 0:
			flag = True
	elif sum(arr[:3]) <= 1:
		flag = True
	if mini != 0:
		for i in range(4):
			arr[i] = 1 - arr[i]
		if arr[3] == 1:
			if sum(arr[:3]) == 0:
				flag = True
		elif sum(arr[:3]) <= 1:
			flag = True
	if flag:
		print('Yes')
	else:
		print('No')
for _ in range(int(input())):
	help()


def check(r, g, b, w):
	n_even = 0
	n_odd = 0
	if r % 2 == 0:
		n_even += 1
	else:
		n_odd += 1
	if g % 2 == 0:
		n_even += 1
	else:
		n_odd += 1
	if b % 2 == 0:
		n_even += 1
	else:
		n_odd += 1
	if w % 2 == 0:
		n_even += 1
	else:
		n_odd += 1
	if n_even == 3 or n_even == 4:
		return True
	else:
		return False
T = int(input())
for _ in range(T):
	(r, g, b, w) = map(int, input().split())
	m = min(r, g, b)
	if m == 0:
		if check(r, g, b, w):
			print('Yes')
		else:
			print('No')
	elif check(r, g, b, w) or check(r - 1, g - 1, b - 1, w + 3):
		print('Yes')
	else:
		print('No')


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	(r, g, b, w) = rinput()
	l = [r, g, b, w]
	zero = even = odd = 0
	for i in range(3):
		if l[i] == 0:
			zero += 1
		elif l[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if w % 2 == 0:
		even += 1
	else:
		odd += 1
	if zero == 3 or zero == 4:
		print('Yes')
	elif zero == 0 and odd == even == 2 or zero == odd == 2 or (zero == 1 and odd >= 2):
		print('No')
	else:
		print('Yes')


def f(l):
	fixed = 0 in l[:3]
	return sum([i % 2 for i in l]) < 2 if fixed else sum([i % 2 for i in l]) != 2
q = int(input())
[print('Yes' if f(list(map(int, input().split()))) else 'No') for _ in range(q)]


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	(r, g, b) = sorted([r, g, b])
	o1 = (r % 2 == 1) + (g % 2 == 1) + (b % 2 == 1)
	o2 = 1 * (w % 2 == 1)
	if r == 0:
		g -= r
		b -= r
		w += 3 * r
		o = (g % 2 == 1) + (b % 2 == 1) + (w % 2 == 1)
		if o > 1:
			print('NO')
		else:
			print('YES')
	elif o1 == 2 and o2 == 0 or (o1 == 1 and o2 == 1):
		g -= r
		b -= r
		w += 3 * r
		o = (g % 2 == 1) + (b % 2 == 1) + (w % 2 == 1)
		if o > 1:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	a = min(r, g, b)
	s = 0
	if r % 2 == 1:
		s += 1
	if g % 2 == 1:
		s += 1
	if b % 2 == 1:
		s += 1
	if w % 2 == 1:
		s += 1
	if s <= 1:
		print('Yes')
	elif a > 0:
		s = 4 - s
		if s <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(n):
	(a, b, c, d) = list(map(int, input().split()))
	if a == b == c == d:
		print('YES')
	elif a == 0 or b == 0 or c == 0:
		co = 0
		if a % 2 == 0:
			co += 1
		if b % 2 == 0:
			co += 1
		if c % 2 == 0:
			co += 1
		if d % 2 == 0:
			co += 1
		if co == 4:
			print('YES')
		elif co == 3:
			print('YES')
		else:
			print('NO')
	else:
		co = 0
		if a % 2 == 0:
			co += 1
		if b % 2 == 0:
			co += 1
		if c % 2 == 0:
			co += 1
		if d % 2 == 0:
			co += 1
		if co == 4:
			print('YES')
		elif co == 3:
			print('YES')
		else:
			a -= 1
			b -= 1
			c -= 1
			d += 3
			co = 0
			if a % 2 == 0:
				co += 1
			if b % 2 == 0:
				co += 1
			if c % 2 == 0:
				co += 1
			if d % 2 == 0:
				co += 1
			if co == 4:
				print('YES')
			elif co == 3:
				print('YES')
			else:
				print('NO')


def color(r, b, g, w) -> bool:
	if r % 2 + b % 2 + g % 2 + w % 2 > 1:
		return False
	return True
t = int(input())
while t > 0:
	(r, g, b, w) = [int(i) for i in input().split()]
	if color(r, b, g, w):
		print('YES')
	elif r > 0 and g > 0 and (b > 0) and color(r - 1, b - 1, g - 1, w + 1):
		print('YES')
	else:
		print('NO')
	t -= 1


for i in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	rem = a % 2 + b % 2 + c % 2 + d % 2
	print('No' if rem == 2 or (rem > 2 and a * b * c == 0) else 'Yes')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	odd = 0
	even = 0
	for i in a:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0 or odd == 1 or odd == 4:
		print('Yes')
		continue
	if odd == 2:
		print('No')
		continue
	if odd == 3:
		if a[0] == 0 or a[1] == 0 or a[2] == 0:
			print('No')
		else:
			print('Yes')


import sys
from math import sqrt
from collections import OrderedDict
inpt = sys.stdin.readline

def inp():
	return int(inpt())

def inlist():
	return list(map(int, inpt().split()))

def instr():
	s = inpt()
	return list(s[:len(s) - 1])

def invr():
	return map(int, inpt().split())

class node(object):

	def __init__(self, x, p, h):
		(self.x, self.p, self.h) = (x, p, h)
		self.children = []

	def add_child(self, obj):
		self.children.append(obj)

def main():
	t = inp()
	for l in range(t):
		(r, g, b, w) = invr()
		flag = False
		if r == 0 or g == 0 or b == 0:
			flag = True
		o = (r % 2 == 1) + (g % 2 == 1) + (b % 2 == 1) + (w % 2 == 1)
		if (r + g + b + w) % 2 == 0:
			if o == 4 or o == 0:
				print('Yes')
			else:
				print('No')
		elif o == 3 or o == 1:
			if flag == True and o == 3:
				print('No')
			else:
				print('Yes')
		else:
			print('No')
main()


from collections import Counter

def isPal(li):
	for it in li:
		if it < 0:
			return False
	c = Counter([it % 2 for it in li])
	return c[1] <= 1

def solve(li):
	ans = isPal(li)
	for (i, it) in enumerate(li):
		li[i] -= 1
	li[3] += 2
	ans |= isPal(li)
	if ans:
		return 'Yes'
	return 'No'
for case in range(int(input())):
	li = list(map(int, input().split()))
	ans = solve(li)
	print(ans)


t = int(input())
for i in range(t):
	(r, g, b, w) = input().split()
	r = int(r)
	g = int(g)
	b = int(b)
	w = int(w)
	ev = 0
	od = 0
	if r % 2 == 0:
		ev += 1
	else:
		od += 1
	if g % 2 == 0:
		ev += 1
	else:
		od += 1
	if b % 2 == 0:
		ev += 1
	else:
		od += 1
	if r == 0 or g == 0 or b == 0:
		if ev == 3:
			print('Yes')
		elif ev == 2:
			if w % 2 == 0:
				print('Yes')
			else:
				print('No')
		elif ev == 1:
			print('No')
	elif ev == 3:
		print('Yes')
	elif ev == 2:
		if w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif ev == 1:
		if w % 2 == 0:
			print('No')
		else:
			print('Yes')
	elif ev == 0:
		print('Yes')


import sys
from math import sqrt, gcd, ceil, log, floor
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))

def f(arr):
	odd = 0
	for i in arr:
		odd += i % 2
	return odd

def main():
	for _ in range(int(input())):
		arr = read()
		fl = 0
		if f(arr) in (0, 1):
			print('Yes')
			continue
		for i in range(min(min(arr[:3]), 3)):
			for j in range(3):
				arr[j] -= 1
			arr[3] += 3
			if f(arr) in (0, 1):
				fl = 1
				break
		print('YNeos'[fl != 1::2])
main()


import sys
import math, bisect
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	(r, g, b, w) = neo()
	k = 10
	f = 0
	while k > 0 and min(r, g, b) >= 0:
		if w % 2 == 0 and r % 2 == 0 and (g % 2 == 0) and (b % 2 == 0):
			f = 1
			break
		if w % 2 == 0 and r % 2 != 0 and (g % 2 == 0) and (b % 2 == 0):
			f = 1
			break
		if w % 2 == 0 and r % 2 == 0 and (g % 2 != 0) and (b % 2 == 0):
			f = 1
			break
		if w % 2 == 0 and r % 2 == 0 and (g % 2 == 0) and (b % 2 != 0):
			f = 1
			break
		if w % 2 != 0 and r % 2 == 0 and (g % 2 == 0) and (b % 2 == 0):
			f = 1
			break
		else:
			r -= 1
			g -= 1
			b -= 1
			w += 3
		k -= 1
	if f == 1:
		print('Yes')
	else:
		print('No')


import sys

def main():
	tn = int(sys.stdin.readline())
	for ti in range(tn):
		(r, g, b, w) = map(int, sys.stdin.readline().split())
		n = r + g + b + w
		(a, c) = (0, 0)
		for v in (r, g, b):
			if v % 2 == 0:
				a += 1
			if v == 0:
				c += 1
		if a == 3 or a == 0:
			print('Yes')
		elif n % 2 == 0:
			print('No')
		elif a == 2:
			print('Yes')
		else:
			print('Yes' if not c else 'No')
main()


def check(arrayList):
	result = 'YES'
	odd_count = odd_counter(arrayList)
	if odd_count > 1:
		if zero_exist(arrayList):
			result = 'NO'
		else:
			for item in range(len(arrayList) - 1):
				arrayList[item] = arrayList[item] - 1
			arrayList[len(arrayList) - 1] = arrayList[len(arrayList) - 1] + 1
			odd_count = odd_counter(arrayList)
			if odd_count > 1:
				result = 'NO'
	print(result)

def odd_counter(lists):
	odd_count = 0
	for item in range(len(lists)):
		if lists[item] % 2 != 0:
			odd_count += 1
	return odd_count

def zero_exist(lists):
	exist = False
	for item in range(len(lists) - 1):
		if lists[item] == 0:
			exist = True
	return exist
t = int(input())
for i in range(0, t):
	n = 4
	lists = list((int(num) for num in input().strip().split()))[:n]
	check(lists)


from collections import Counter, deque, defaultdict
from itertools import accumulate, product, groupby
import operator
import math
from functools import reduce
import sys
import decimal

def readIntLine():
	return [int(char) for char in input().split()]

def readCharLine():
	return [char for char in input().split()]

def solve():
	arr = readIntLine()
	odd_count = sum((1 for a in arr if a & 1))
	if odd_count <= 1:
		return True
	(r, g, b, w) = arr
	l1 = [r, g, b]
	mn = min(l1)
	if mn == 0:
		return False
	l1 = [l - 1 for l in l1] + [w + 3]
	return sum((1 for a in l1 if a & 1)) <= 1
for _ in range(int(input())):
	print('Yes') if solve() else print('No')


test = int(input())
for q in range(test):
	x = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for i in range(3):
		if x[i] % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd == 0 or odd == 3:
		print('YES')
		continue
	elif odd == 1 and x[3] % 2 == 0:
		print('YES')
	elif odd == 2 and x[3] % 2 == 1 and min(x[1], x[2], x[0]):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	f = (r & 1) + (g & 1) + (b & 1) + (w & 1) <= 1
	if r and g and b:
		(r, g, b, w) = (r - 1, g - 1, b - 1, w + 3)
	f |= (r & 1) + (g & 1) + (b & 1) + (w & 1) <= 1
	if f:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = [int(x) for x in input().split()]
	a[0:-1] = sorted(a[0:-1])
	rem = 0
	for i in range(4):
		rem += a[i] % 2
	print('Yes' if rem <= 1 or (rem >= 3 and a[0]) else 'No')


for _ in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	m = min(r, g, b)
	c = 0
	for i in [r, g, b]:
		if i % 2 != 0:
			c += 1
	if m == 0:
		if w % 2 != 0:
			c += 1
		if c > 1:
			print('No')
		else:
			print('Yes')
		continue
	if w % 2 == 0:
		if c == 2:
			print('No')
		else:
			print('Yes')
	elif c == 1:
		print('No')
	else:
		print('Yes')


def a(x):
	n_e = 0
	n_o = 0
	for a in x:
		if a % 2 == 1:
			n_o += 1
		else:
			n_e += 1
	return (n_o, n_e)
T = int(input())
for _ in range(T):
	(r, g, b, w) = map(int, input().split())
	z = a([r, g, b, w])
	if z[0] <= 1:
		print('Yes')
		continue
	elif r >= 1 and g >= 1 and (b >= 1):
		w += 1
		r -= 1
		g -= 1
		b -= 1
		z = a([r, g, b, w])
		if z[0] <= 1:
			print('Yes')
			continue
	print('No')


from sys import stdin
N = int(stdin.readline())
for _ in range(N):
	(a, b, c, d) = map(int, stdin.readline().split())
	if a == 0 or b == 0 or c == 0:
		a = a % 2
		b = b % 2
		c = c % 2
		d = d % 2
		sums = a + b + c + d
		if sums % 2 == 0:
			if a == b == c == d:
				print('YES')
			else:
				print('NO')
		elif sums == 1:
			print('YES')
		else:
			print('NO')
		continue
	a = a % 2
	b = b % 2
	c = c % 2
	d = d % 2
	sums = a + b + c + d
	if sums % 2 == 0:
		if a == b == c == d:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	l1 = list(map(int, input().split()))
	(e, o) = (0, 0)
	for i in range(4):
		if l1[i] % 2 != 0:
			o += 1
		elif l1[i] > 0:
			e += 1
	if l1.count(0) == 4:
		print('Yes')
	elif l1.count(0) == 3:
		print('Yes')
	elif l1.count(0) == 2:
		if o == 2:
			print('No')
		else:
			print('Yes')
	elif l1.count(0) == 1:
		if l1[3] == 0:
			if e > o:
				print('Yes')
			elif o == 3:
				print('Yes')
			elif o == 2 and e == 1:
				print('No')
		elif e >= 2:
			print('Yes')
		elif o >= 2:
			print('No')
	elif o == 1 or o == 0 or o == 4 or (o == 3):
		print('Yes')
	elif o == e:
		print('No')


n = int(input())

def check(r, g, b, w):
	cnt = 0
	for c in (r, g, b, w):
		if c % 2:
			cnt += 1
	return cnt
for i in range(n):
	(r, g, b, w) = map(int, input().split())
	s = sum([r, g, b, w])
	f = 0
	if check(r, g, b, w) == 1 and s % 2:
		f = 1
	if check(r, g, b, w) == 0 and s % 2 == 0:
		f = 1
	if r and g and b:
		r -= 1
		g -= 1
		b -= 1
		w += 1
	if check(r, g, b, w) == 1 and s % 2:
		f = 1
	if check(r, g, b, w) == 0 and s % 2 == 0:
		f = 1
	if f:
		print('Yes')
	else:
		print('No')


from functools import reduce
from collections import Counter
import time
import datetime

def time_t():
	print('Current date and time: ', datetime.datetime.now())
	print('Current year: ', datetime.date.today().strftime('%Y'))
	print('Month of year: ', datetime.date.today().strftime('%B'))
	print('Week number of the year: ', datetime.date.today().strftime('%W'))
	print('Weekday of the week: ', datetime.date.today().strftime('%w'))
	print('Day of year: ', datetime.date.today().strftime('%j'))
	print('Day of the month : ', datetime.date.today().strftime('%d'))
	print('Day of week: ', datetime.date.today().strftime('%A'))

def ip():
	return int(input())

def sip():
	return input()

def mip():
	return map(int, input().split())

def mips():
	return map(str, input().split())

def lip():
	return list(map(int, input().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.append(arr)
	return lst

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)
t = ip()
while t:
	t -= 1
	lst = lip()
	z = min(lst[0], lst[1], lst[2])
	odd = 0
	for item in lst:
		if item % 2 != 0:
			odd += 1
	if odd <= 1:
		print('YES')
	elif odd == 2:
		print('NO')
	elif z > 0:
		print('YES')
	else:
		print('NO')


from math import *
from collections import *
from random import *
from decimal import Decimal
from heapq import *
from bisect import *
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 5)

def lis():
	return list(map(int, input().split()))

def ma():
	return map(int, input().split())

def inp():
	return int(input())

def st():
	return input().rstrip('\n')
t = inp()
while t:
	t -= 1
	(r, b, g, w) = ma()
	if r % 2 == b % 2 == g % 2 == 0:
		print('Yes')
		continue
	if r == 0 or b == 0 or g == 0:
		od = 0
		if r % 2:
			od += 1
		if g % 2:
			od += 1
		if b % 2:
			od += 1
		if od and w % 2:
			print('No')
		elif w % 2 == 0 and od == 1:
			print('Yes')
		else:
			print('No')
	else:
		if r % 2 == b % 2 == g % 2 == 1:
			print('Yes')
			continue
		if w % 2:
			od = 0
			if r % 2:
				od += 1
			if g % 2:
				od += 1
			if b % 2:
				od += 1
			if od == 1:
				print('No')
			else:
				print('Yes')
		else:
			od = 0
			if r % 2:
				od += 1
			if g % 2:
				od += 1
			if b % 2:
				od += 1
			if od == 1:
				print('Yes')
			else:
				print('No')


def solve(r, g, b, w):
	count_0 = 0
	if r == 0:
		count_0 += 1
	if g == 0:
		count_0 += 1
	if b == 0:
		count_0 += 1
	count_even = 0
	count_odd = 0
	if r % 2 == 0:
		count_even += 1
	else:
		count_odd += 1
	if g % 2 == 0:
		count_even += 1
	else:
		count_odd += 1
	if b % 2 == 0:
		count_even += 1
	else:
		count_odd += 1
	if w % 2 == 0:
		count_even += 1
	else:
		count_odd += 1
	if count_0 > 0:
		if count_odd == 0:
			print('Yes')
		elif count_odd == 1:
			print('Yes')
		else:
			print('No')
	elif count_even == 3 and count_odd == 1:
		print('Yes')
	elif count_even == 1 and count_odd == 3:
		print('Yes')
	elif count_even == 4 or count_odd == 4:
		print('Yes')
	else:
		print('No')
t = int(input())
while t:
	(r, g, b, w) = map(int, input().split())
	solve(r, g, b, w)
	t -= 1


class Check:

	def check(self, r, g, b, w):
		return False if r % 2 + g % 2 + b % 2 + w % 2 > 1 else True

	def solve(self, r, g, b, w):
		if self.check(r, g, b, w):
			return 'Yes'
		elif r > 0 and g > 0 and (b > 0) and self.check(r - 1, g - 1, b - 1, w + 3):
			return 'Yes'
		else:
			return 'No'
t = int(input())
while t > 0:
	(r, g, b, w) = [int(x) for x in input().split(' ')]
	c = Check()
	print(c.solve(r, g, b, w))
	t -= 1


def color(r, g, b, w):
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		return 1
	return 0
t = int(input())
for k in range(t):
	(r, g, b, w) = map(int, input().split())
	if color(r, g, b, w):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0) and color(r - 1, g - 1, b - 1, w + 1):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	odd = 0
	nz = 0
	c = 0
	if r % 2 != 0:
		odd += 1
	if g % 2 != 0:
		odd += 1
	if b % 2 != 0:
		odd += 1
	if r:
		nz += 1
	if g:
		nz += 1
	if b:
		nz += 1
	nz = 3 - nz
	if w & 1:
		flag = True
	else:
		flag = False
	if flag:
		c = 1
	if odd + c == 1 or odd + c == 0:
		print('Yes')
	elif c == 1 and odd == 2 and (nz == 0):
		print('Yes')
	elif odd == 3:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b, c, d) = map(int, input().split())
	ans = 0
	if a % 2 == 1:
		ans += 1
	if b % 2 == 1:
		ans += 1
	if c % 2 == 1:
		ans += 1
	if d % 2 == 1:
		ans += 1
	if ans <= 1:
		print('Yes')
	elif min(a, b, c) == 0:
		print('No')
	else:
		a -= 1
		b -= 1
		c -= 1
		d += 3
		ans = 0
		if a % 2 == 1:
			ans += 1
		if b % 2 == 1:
			ans += 1
		if c % 2 == 1:
			ans += 1
		if d % 2 == 1:
			ans += 1
		if ans <= 1:
			print('Yes')
		else:
			print('No')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		print('Yes')
		continue
	if r > 0 and g > 0 and (b > 0):
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 10 ** 9 + 7
EPS = 1e-06

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	(r, g, b, w) = value()
	(r, a, b) = sorted((r, g, b))
	have = r
	a -= r
	b -= r
	w += r
	ok = False
	status = [i % 2 for i in (a, b, w)]
	s = sum(status)
	if s <= 1:
		ok = True
	elif s == 3:
		if have > 0:
			ok = True
		else:
			ok = False
	else:
		ok = False
	if ok:
		print('Yes')
	else:
		print('No')


def isPalindrome(r, g, b, w, ops):
	r -= ops
	g -= ops
	b -= ops
	w += 3 * ops
	(ar, ag, ab, aw) = (r % 2, g % 2, b % 2, w % 2)
	if ar + ag + ab + aw > 1:
		return False
	return True

def isPossible(r, g, b, w):
	maxOps = min(r, g, b)
	if isPalindrome(r, g, b, w, 0):
		return 'Yes'
	if maxOps > 0:
		if isPalindrome(r, g, b, w, 1):
			return 'Yes'
	return 'No'
T = int(input())
for i in range(T):
	[r, g, b, w] = map(int, input().split())
	print(isPossible(r, g, b, w))


for t in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	count = r % 2 + g % 2 + b % 2
	zero = r == 0 or g == 0 or b == 0
	if zero:
		count += w % 2
		if count < 2:
			print('Yes')
		else:
			print('No')
	elif w % 2 == 0:
		if count == 2:
			print('No')
		else:
			print('Yes')
	elif count == 1:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(r, g, b, w) = I()
	x = sorted([r, g, b])
	f = 0
	ct = 0
	for i in x + [w]:
		ct += i % 2
	if ct == 2 or ct == 3:
		if w % 2:
			if ct == 2 or x[0] == 0:
				f = 1
		elif ct == 2:
			f = 1
	print('YNeos'[f::2])


t = int(input())
for tt in range(t):
	(a, b, c, d) = map(int, input().split())
	ss = a % 2 + b % 2 + c % 2 + d % 2
	if a > 0 and b > 0 and (c > 0):
		a = max(a - 1, 0)
		b = max(b - 1, 0)
		c = max(c - 1, 0)
		d = d + 3
	s = a % 2 + b % 2 + c % 2 + d % 2
	if s > 1 and ss > 1:
		print('No')
	else:
		print('Yes')


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	check = min([r, g, b])
	o = 0
	e = 0
	for i in [r, g, b, w]:
		if i % 2:
			o += 1
		else:
			e += 1
	if o == 0 or (o == 1 and e == 3):
		print('Yes')
	elif o >= 2 and check == 0:
		print('No')
	elif o == 2:
		print('No')
	else:
		print('Yes')


def sol(A):
	odds = 0
	for a in A:
		if a % 2 == 1:
			odds += 1
	if odds == 1 or odds == 0:
		return 'YES'
	elif odds == 2:
		return 'NO'
	if A[0] > 0 and A[1] > 0 and (A[2] > 0):
		return 'YES'
	return 'NO'
numOfTests = int(input())
testCases = []
for i in range(numOfTests):
	testCases.append(list(str(input())))
parsed = []
for t in testCases:
	p = ''.join(t)
	p = p.split()
	p = list(map(int, p))
	parsed.append(p)
for p in parsed:
	print(sol(p))


t = int(input())
for _ in range(t):
	(r, g, b, w) = list(map(lambda x: int(x), input().split()))
	s = r + g + b + w
	n_eve = 0
	n_odd = 0
	for i in [r, g, b, w]:
		if i % 2 == 0:
			n_eve += 1
		else:
			n_odd += 1
	if s % 2 == 0:
		if n_eve == 4 or n_odd == 4:
			print('Yes')
		else:
			print('No')
	elif n_odd == 3 and r != 0 and (g != 0) and (b != 0):
		print('Yes')
	elif n_odd == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(r, g, b, w) = [int(x) for x in input().split()]
	s = [r, g, b, w]
	c = 0
	for i in s:
		if i % 2 != 0:
			c += 1
	if c == 0 or c == 1:
		print('YES')
	elif c == 2:
		print('NO')
	elif c == 3:
		if r > 0 and g > 0 and (b > 0):
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
	t -= 1


for i in range(int(input())):
	(a, b, c, d) = [int(i) for i in input().split()]
	x = a % 2 + b % 2 + c % 2 + d % 2
	if x > 2 and a * b * c > 0:
		print('YES')
	elif x < 2:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	L = [r, g, b]
	c = min(L)
	L = [l % 2 for l in L]
	if sum(L) == 0:
		print('Yes')
	elif sum(L) == 1:
		if w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif sum(L) == 2:
		if c > 0 and (3 + w) % 2 == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


import math
m = 1000000007

def fact(n):
	ans = 1
	for i in range(1, n + 1):
		ans = ans % m * (i % m) % m
	return ans

def power_2(n):
	ans = 1
	for i in range(n):
		ans = ans % m * 2 % m
	return ans
for z in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	cnt = 0
	if r % 2:
		cnt += 1
	if g % 2:
		cnt += 1
	if b % 2:
		cnt += 1
	if cnt == 0 or cnt == 3:
		print('Yes')
	elif cnt == 1 and w % 2 == 0:
		print('Yes')
	elif cnt == 2 and r > 0 and (g > 0) and (b > 0) and w % 2:
		print('Yes')
	else:
		print('No')


import sys

def can(r, g, b, w):
	res = 0
	if r % 2 == 1:
		res += 1
	if g % 2 == 1:
		res += 1
	if b % 2 == 1:
		res += 1
	if w % 2 == 1:
		res += 1
	return res
tc = int(sys.stdin.readline())
for _ in range(tc):
	(red, green, blue, white) = map(int, sys.stdin.readline().split())
	if red < 1 or green < 1 or blue < 1:
		if can(red, green, blue, white) < 2:
			print('Yes')
		else:
			print('No')
	elif can(red, green, blue, white) != 2:
		print('Yes')
	else:
		print('No')


rr = lambda : input().strip()
rrm = lambda : map(int, rr().split())

def solve():
	rgbw = list(rrm())
	cou = 0
	for i in rgbw:
		if i % 2:
			cou += 1
	if cou == 0 or cou == 1:
		return 'Yes'
	if rgbw[0] != 0 and rgbw[1] != 0 and (rgbw[2] != 0):
		if cou == 2:
			return 'No'
		return 'Yes'
	return 'No'
T = int(rr())
for _ in range(T):
	ans = solve()
	print(ans)


t = int(input())
while t:
	arr = list(map(int, input().split()))
	c = 0
	for i in arr:
		if i % 2 == 1:
			c += 1
	if c <= 1:
		print('Yes')
	elif arr[0] and arr[1] and arr[2]:
		arr[3] += 3
		arr[0] -= 1
		arr[1] -= 1
		arr[2] -= 1
		c = 0
		for i in arr:
			if i % 2 == 1:
				c += 1
		if c <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')
	t -= 1


def count_odd(arr):
	ans = 0
	for i in arr:
		if i & 1 == 1:
			ans += 1
	return ans

def answer(arr):
	i = 0
	while i < 100:
		if count_odd(arr) == 0 or count_odd(arr) == 1:
			return 'Yes'
		arr[0] -= 1
		arr[1] -= 1
		arr[2] -= 1
		arr[3] += 3
		if arr[0] < 0 or arr[1] < 0 or arr[2] < 0:
			return 'No'
		i += 1
	return 'No'
t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	print(answer(arr))


def check(colour):
	odd = 0
	for i in colour:
		if i % 2 != 0:
			odd += 1
	if odd <= 1:
		return 'YES'
	elif min(colour[:3]) == 0:
		return 'NO'
	else:
		colour[3] += 3
		colour[1] -= 1
		colour[2] -= 1
		colour[0] -= 1
		odd = 0
		for i in colour:
			if i % 2 != 0:
				odd += 1
		if odd <= 1:
			return 'YES'
		else:
			return 'NO'
t = int(input())
ans = []
for i in range(t):
	colour = [int(i) for i in input().split()]
	ans.append(check(colour))
for i in ans:
	print(i)


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	c1 = r % 2 + g % 2 + b % 2
	c = r % 2 + g % 2 + b % 2 + w % 2
	if c % 2 == 0:
		if c == 0:
			print('Yes')
		elif min(r, g, b) != 0 and w % 2 != 0 and (c1 == 3):
			print('Yes')
		else:
			print('No')
	elif c == 1:
		print('Yes')
	elif c1 == 3 and w % 2 == 0:
		print('Yes')
	elif c1 == 2 and w % 2 == 1 and (min(r, g, b) != 0):
		print('Yes')
	else:
		print('No')


t = int(input())

def solve(rgbw):
	s = sum(rgbw)
	odd_cnt = 0
	for i in range(4):
		if rgbw[i] % 2 == 1:
			odd_cnt += 1
	if s % 2 == 0:
		if odd_cnt == 0 or odd_cnt == 4:
			return 'Yes'
		else:
			return 'No'
	if odd_cnt == 1:
		return 'Yes'
	else:
		zero_rgb = False
		for i in range(3):
			if rgbw[i] == 0:
				zero_rgb = True
		if zero_rgb:
			return 'No'
		else:
			return 'Yes'
for _ in range(t):
	num = list(map(int, input().split()))
	print(solve(num))


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	ans = 'No'
	if len([i for i in [a, b, c, d] if i % 2]) <= 1:
		ans = 'Yes'
	if all([a, b, c]):
		a -= 1
		b -= 1
		c -= 1
		d += 3
		if len([i for i in [a, b, c, d] if i % 2]) <= 1:
			ans = 'Yes'
	print(ans)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import deque
from heapq import heappush, heappop, heapify
mod = int(1000000000.0) + 7
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
t = ip()
for _ in range(t):
	(a, b, c, d) = inp()
	arr = [a, b, c, d]
	arr = [i % 2 for i in arr]
	if arr.count(0) == 4:
		print('Yes')
	elif arr.count(0) == 3:
		print('Yes')
	elif a == 0 or b == 0 or c == 0:
		print('No')
	else:
		(a, b, c) = (a - 1, b - 1, c - 1)
		d += 3
		arr = [a, b, c, d]
		arr = [i % 2 for i in arr]
		if arr.count(0) == 3 or arr.count(0) == 4:
			print('Yes')
		else:
			print('No')


for T in range(int(input())):
	(r, g, b, w) = map(int, input().split(' '))
	s = r + g + b + w
	l = [r, g, b, w]
	c = 0
	z = 0
	for i in l:
		if i % 2 == 0:
			c = c + 1
		if i == 0:
			z = z + 1
	if w == 0:
		z = z - 1
	if s % 2 == 0:
		if c == 0 or c == 4:
			print('YES')
		else:
			print('No')
	else:
		if c == 4 or c == 0 or c == 2:
			print('NO')
		if c == 1 and z == 0 or c == 3:
			print('YES')
		else:
			print('NO')


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	c = li()
	d = [c[i] & 1 for i in range(4)]
	if sum(d) == 0 or sum(d) == 4 or sum(d) == 1:
		print('Yes')
	elif sum(d) == 2:
		print('No')
	elif d[-1] == 0:
		print('Yes')
	elif any((i == 0 for i in c[:3])):
		print('No')
	else:
		print('Yes')


t = int(input())
while t != 0:
	(r, g, b, w) = map(int, input().split())
	balls = []
	balls = [r, g, b, w]
	yes = 0
	for _ in range(2):
		c = 0
		for i in range(4):
			if balls[i] % 2 != 0:
				c += 1
		if c <= 1:
			yes = 1
			break
		if balls[0] >= 1 and balls[1] >= 1 and (balls[2] >= 1):
			balls[0] -= 1
			balls[1] -= 1
			balls[2] -= 1
			balls[3] += 3
	if yes == 1:
		print('YES')
	else:
		print('No')
	t -= 1


from sys import stdin, stdout
import math
t = int(stdin.readline())
for _ in range(t):
	(r, g, b, w) = map(int, stdin.readline().split())
	e = 0
	if r % 2 == 1:
		e += 1
	if g % 2 == 1:
		e += 1
	if b % 2 == 1:
		e += 1
	ok = False
	if w % 2 == 1 and e == 0:
		ok = True
	if w % 2 == 0 and e <= 1:
		ok = True
	if not ok and r > 0 and (g > 0) and (b > 0):
		e = 3 - e
		w += 1
		if w % 2 == 1 and e == 0:
			ok = True
		if w % 2 == 0 and e <= 1:
			ok = True
	if ok:
		print('YES')
	else:
		print('NO')


import sys
t = int(input())
while t:
	t -= 1
	c = list(map(int, input().split()))
	oc = 0
	ec = 0
	for i in range(4):
		if c[i] % 2 != 0:
			oc += 1
		else:
			ec += 1
	mn = min(c)
	mx = max(c)
	if mn == mx == 0:
		print('Yes')
	elif c[0] == 0 or c[1] == 0 or c[2] == 0:
		if oc == 1 or ec == 4:
			print('Yes')
		else:
			print('No')
	elif oc == 1 or ec == 1 or ec == 4 or (oc == 4):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	nums = list(map(int, input().split()))
	odds = {}
	evens = {}
	for (z, x) in enumerate(nums):
		if x % 2 == 0:
			evens[z] = x
		else:
			odds[z] = x
	if len(odds) < 2:
		print('YES')
	elif len(odds) > 2 and 0 not in nums[:3]:
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(a):
	s = input().split()
	for j in range(4):
		s[j] = int(s[j])
	if (s[0] + s[1] + s[2] + s[3]) % 2 == 0:
		if (s[0] + s[1]) % 2 == 0 and (s[1] + s[2]) % 2 == 0 and ((s[2] + s[3]) % 2 == 0):
			print('Yes')
		else:
			print('No')
	else:
		n = 0
		for abc in range(4):
			n += s[abc] % 2
		if n == 1:
			print('Yes')
		elif n == 3 and min(s[:3]) > 0:
			print('Yes')
		else:
			print('No')


t = int(input())

def f(a):
	odd = 0
	for i in a:
		if i % 2 == 1:
			odd += 1
	return odd <= 1
while t:
	a = [int(x) for x in input().split()]
	even = 0
	for i in a[:3]:
		if i % 2 == 0:
			even += 1
	if even == 0 or even == 3:
		flag = 1
	elif even == 2:
		if a[-1] % 2 == 0:
			flag = 1
		else:
			flag = 0
	elif even == 1:
		if a[-1] % 2 == 1 and a.count(0) == 0:
			flag = 1
		else:
			flag = 0
	if flag == 1:
		print('Yes')
	else:
		print('No')
	t -= 1


t = int(input())

def fn():
	(r, g, b, w) = map(int, input().split())
	if r == 0 and g == 0 and (b == 0) or (r == 0 and g == 0 and (b == 0) and (w == 1)) or (r == 1 and g == 0 and (b == 0) and (w == 0)) or (r == 0 and g == 1 and (b == 0) and (w == 0)) or (r == 0 and g == 0 and (b == 1) and (w == 0)):
		return 'Yes'
	elif r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
		return 'Yes'
	elif r & 1 and g & 1 and b & 1:
		return 'Yes'
	elif r & 1 and g & 1 and (b & 1 == 0) and w & 1 and (b > 0) or (g & 1 and b & 1 and (r & 1 == 0) and w & 1 and (r > 0)) or (r & 1 and b & 1 and (g & 1 == 0) and w & 1 and (g > 0)):
		return 'Yes'
	elif r & 1 == 0 and g & 1 == 0 and b & 1 and (w & 1 == 0) or (g & 1 == 0 and b & 1 == 0 and r & 1 and (w & 1 == 0)) or (r & 1 == 0 and b & 1 == 0 and g & 1 and (w & 1 == 0)):
		return 'Yes'
	else:
		return 'No'
while t:
	print(fn())
	t -= 1


t = int(input())
for i in range(t):
	(r, g, b, w) = list(map(int, input().split()))
	a = r + g + b + w
	d = []
	k = [r, g, b]
	if r % 2 == 0:
		d.append(True)
	else:
		d.append(False)
	if g % 2 == 0:
		d.append(True)
	else:
		d.append(False)
	if b % 2 == 0:
		d.append(True)
	else:
		d.append(False)
	if d.count(True) == 3 or d.count(False) == 3:
		print('Yes')
	elif d.count(False) == 1 and a % 2 == 1:
		print('Yes')
	elif d.count(True) == 1 and k.count(0) == 0 and (a % 2 == 1):
		print('Yes')
	else:
		print('No')


import sys

def input():
	return sys.stdin.readline().strip()

def count(r, g, b, w):
	n = 0
	if r % 2:
		n += 1
	if g % 2:
		n += 1
	if b % 2:
		n += 1
	if w % 2:
		n += 1
	return n
t = int(input())
while t:
	t -= 1
	(r, g, b, w) = map(int, input().split())
	if count(r, g, b, w) == 2:
		print('No')
	else:
		found = False
		while not found:
			if count(r, g, b, w) < 2:
				found = True
			elif r == 0 or g == 0 or b == 0:
				break
			else:
				r -= 1
				g -= 1
				b -= 1
				w += 1
		if found:
			print('Yes')
		else:
			print('No')


from collections import defaultdict as dd
import math
import sys
import string
input = sys.stdin.readline

def nn():
	return int(input())

def li():
	return list(input())

def mi():
	return list(map(int, input().split()))

def lm():
	return list(map(int, input().split()))

def solve():
	(r, g, b, w) = mi()
	par = r % 2 + g % 2 + b % 2 + w % 2
	if par <= 1:
		print('Yes')
		return
	elif r >= 1 and g >= 1 and (b >= 1):
		if par == 3 or par == 4:
			print('Yes')
			return
	print('No')
q = nn()
for _ in range(q):
	solve()


def f(r, b, g, w):
	k = 0
	if r % 2 == 1:
		k += 1
	if b % 2 == 1:
		k += 1
	if g % 2 == 1:
		k += 1
	if w % 2 == 1:
		k += 1
	if k == 0 or k == 1:
		return True
	else:
		return False
for _ in range(int(input())):
	(r, g, b, w) = [int(i) for i in input().split()]
	if f(r, b, g, w):
		print('Yes')
	elif min(r, b, g) > 0:
		if f(r - 1, b - 1, g - 1, w + 3):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import sys
t = int(input())
for i in range(t):
	arr = [int(i) for i in input().split()]
	m = arr[0]
	if m == arr[1] and m == arr[2] and (m == arr[3]):
		print('Yes')
		continue
	minimum = sys.maxsize
	for i in range(len(arr)):
		if minimum > arr[i]:
			minimum = arr[i]
	oddvalue = 0
	count1 = 0
	for i in range(len(arr)):
		if arr[i] == 1:
			count1 += 1
	if minimum != 0 or ((arr[0] != 0 and arr[1] != 0 and (arr[2] != 0)) and count1 != 1):
		for i in range(len(arr)):
			if arr[i] % 2 != 0:
				oddvalue += 1
		if oddvalue == 2:
			print('No')
		else:
			print('Yes')
		continue
	if minimum == 0 and (arr[0] == 0 or arr[1] == 0 or arr[2] == 0):
		for i in range(len(arr)):
			if arr[i] % 2 != 0:
				oddvalue += 1
		if oddvalue == 1 or oddvalue == 0:
			print('Yes')
		else:
			print('No')
		continue
	if minimum == 0 and arr[3] == 0 and (count1 == 1):
		for i in range(len(arr)):
			if arr[i] % 2 != 0:
				oddvalue += 1
		if oddvalue == 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split(' '))
	ans = 'No'
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1 or (r >= 1 and g >= 1 and (b >= 1) and ((r - 1) % 2 + (g - 1) % 2 + (b - 1) % 2 + (w + 3) % 2 <= 1)):
		ans = 'Yes'
	print(ans)


def odd(arr):
	count = 0
	for i in arr:
		if i % 2 != 0:
			count += 1
	return count

def solve(arr):
	op = 1
	if arr[0] == 0 or arr[1] == 0 or arr[2] == 0:
		op = 0
	if odd(arr) == 2:
		return 'NO'
	if odd(arr) < 2 or (odd(arr) > 2 and op == 1):
		return 'YES'
	else:
		return 'NO'
t = int(input())
for i in range(t):
	arr = list(map(int, input().split()))
	result = solve(arr)
	print(result)


import os
import sys
from io import BytesIO, IOBase

def solution(r, g, b, w):
	balls = [r, g, b, w]
	odds = sum((1 for x in balls if x & 1))
	if odds <= 1:
		write('Yes')
		return
	if min(balls[:-1]) == 0:
		write('No')
	else:
		balls[0] -= 1
		balls[1] -= 1
		balls[2] -= 1
		balls[-1] += 3
		odds = sum((1 for x in balls if x & 1))
		if odds <= 1:
			write('Yes')
		else:
			write('No')

def main():
	for _ in range(r_int()):
		(r, g, b, w) = r_array()
		solution(r, g, b, w)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


def solve():
	(r, g, b, w) = map(int, input().split())
	odd = 0
	RGB = [r, g, b]
	m = min(RGB)
	RGBW = [r, g, b, w]
	for x in RGBW:
		if x % 2 == 1:
			odd += 1
	if odd == 0 or odd == 1 or odd == 4:
		return 'Yes'
	if odd == 2:
		return 'No'
	if odd == 3:
		if m > 0:
			return 'Yes'
		else:
			return 'No'

def main():
	t = int(input())
	ANS = [solve() for _ in range(t)]
	print('\n'.join(ANS))
main()


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	c = 0
	mi = 1000000000000
	ev = 0
	od = 0
	for i in [r, g, b, w]:
		c += 1
		if i % 2 == 0:
			ev += 1
		else:
			od += 1
		if c != 4:
			mi = min(mi, i)
	if ev == 3 and od == 1 or (ev == 4 and od == 0):
		print('YES')
	elif mi > 0:
		ev = 0
		od = 0
		for i in [r - 1, g - 1, b - 1, w + 3]:
			if i % 2 == 0:
				ev += 1
			else:
				od += 1
		if ev == 3 and od == 1 or (ev == 4 and od == 0):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	t = (r & 1) + (g & 1) + (b & 1) + (w & 1)
	if not min(r, g, b):
		print('Yes' if t < 2 else 'No')
	else:
		print('No' if t == 2 else 'Yes')


def main():
	n = int(input())
	for i in range(n):
		solve()

def solve():
	arr = list(map(int, input().split()))
	score = min(arr[0], arr[1], arr[2])
	count = 0
	for i in arr:
		if i % 2 == 1:
			count += 1
	if count < 2:
		print('Yes')
		return
	if score != 0:
		count = 0
		for i in arr:
			if (i - 1) % 2 == 1:
				count += 1
	if count < 2:
		print('Yes')
		return
	print('No')
main()


for s in range(int(input())):
	rama = list(map(int, input().split()))
	add = 0
	sum = 0
	for i in range(4):
		if rama[i] % 2 == 0:
			add += 1
	if add >= 3:
		sum += 1
	for i in range(4):
		if i == 3:
			rama[i] += 3
		else:
			rama[i] -= 1
	add = 0
	for i in range(4):
		if rama[i] >= 0:
			if rama[i] % 2 == 0:
				add += 1
		else:
			flag = 2
			break
	if add >= 3:
		sum += 1
	if sum == 0:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	even = 0
	odd = 0
	col = [int(x) for x in input().split()]
	for c in col:
		if c % 2 == 0:
			even += 1
		else:
			odd += 1
	if not odd in [0, 1] and min(col[0], col[1], col[2]) > 0:
		col[0] -= 1
		col[1] -= 1
		col[2] -= 1
		col[3] += 3
		even = 0
		odd = 0
		for c in col:
			if c % 2 == 0:
				even += 1
			else:
				odd += 1
	if odd in [0, 1]:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	e = 0
	f = 0
	for i in [r, g, b, w]:
		if i % 2 == 0:
			e += 1
	if e >= 3:
		f = 1
	elif 0 not in [r, g, b]:
		e = 0
		(ri, gi, bi, wi) = (r - 1, g - 1, b - 1, w + 3)
		for i in [ri, gi, bi, wi]:
			if i % 2 == 0:
				e += 1
		if e >= 3:
			f = 1
		elif 0 not in [ri, gi, bi]:
			e = 0
			(ri, gi, bi, wi) = (ri - 1, gi - 1, bi - 1, wi + 3)
			for i in [ri, gi, bi, wi]:
				if i % 2 == 0:
					e += 1
			if e >= 3:
				f = 1
	if f == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	t -= 1
	(r, g, b, w) = list(map(int, input().split(' ')))
	(even, odd) = (0, 0)
	if r % 2 == 0:
		even += 1
	if g % 2 == 0:
		even += 1
	if b % 2 == 0:
		even += 1
	if w % 2 == 0:
		even += 1
	odd = 4 - even
	if odd <= 1:
		print('Yes')
	elif even <= 1:
		if r >= 1 and g >= 1 and (b >= 1):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for ii in range(t):
	(r, g, b, w) = map(int, input().split())
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) and (w % 2 == 0):
		print('YES')
	else:
		if r == 0 or g == 0 or b == 0:
			l = [r, g, b, w]
			eve = 0
			odd = 0
			for i in l:
				if i != 0 and i % 2 == 0:
					eve += 1
				elif i % 2 == 1:
					odd += 1
			if odd == 0 or odd == 1:
				print('YES')
			else:
				print('NO')
			continue
		l = [r, g, b, w]
		cnt = 0
		for i in l:
			if i % 2 == 1:
				cnt += 1
		if cnt == 1:
			print('YES')
			continue
		if w % 2 == 1:
			cnt -= 1
		if cnt == 3:
			print('YES')
		elif cnt == 2 and w % 2 == 1:
			print('YES')
		elif cnt == 2:
			print('NO')
		else:
			print('NO')


t = int(input())
z = 1
while z <= t:
	c = input().split()
	r = int(c[0])
	g = int(c[1])
	b = int(c[2])
	w = int(c[3])
	p = 0
	if r % 2 == 0:
		p = p + 1
	if g % 2 == 0:
		p = p + 1
	if b % 2 == 0:
		p = p + 1
	if w % 2 == 0:
		p = p + 1
	if p == 1:
		if w % 2 == 0:
			print('Yes')
		elif r == 0 or g == 0 or b == 0:
			print('No')
		else:
			print('Yes')
	elif p == 2:
		print('No')
	if p == 0 or p == 3 or p == 4:
		print('Yes')
	z = z + 1


read = input
rn = lambda : list(map(int, read().split()))
T = rn()[0]
for _ in range(T):
	input_list = rn()
	[r, g, b, w] = input_list
	even_k_cnt = sum(list(map(lambda x: x % 2 == 0, input_list)))
	if even_k_cnt == 4 or even_k_cnt == 3:
		print('Yes')
	elif min(input_list[:3]) >= 1:
		even_3_cnt = sum(list(map(lambda x: x % 2 == 0, input_list[:3])))
		even_w_cnt = sum(list(map(lambda x: x % 2 == 0, input_list[3:])))
		if even_3_cnt == 1 and even_w_cnt == 1:
			print('No')
		elif even_3_cnt == 2 and even_w_cnt == 0:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	array = list(map(int, input().split()))
	blank = []
	for i in array:
		if i % 2 == 1:
			blank.append(i)
	minimum = min(array[:3])
	if len(blank) == 1 or len(blank) == 0:
		print('Yes')
	elif len(blank) == 3:
		if minimum != 0:
			print('Yes')
		else:
			print('No')
	elif len(blank) == 4:
		if minimum != 0:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(n):
	arr = list(map(int, input().split()))
	even = 0
	for i in arr:
		if i % 2 == 0:
			even += 1
	if even >= 3 or even == 0:
		print('Yes')
	elif even == 1 and arr[0] * arr[1] * arr[2] > 0:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout, stderr, maxsize
tup = lambda : map(int, stdin.readline().split())
I = lambda : int(stdin.readline())
lint = lambda : [int(x) for x in stdin.readline().split()]
S = lambda : stdin.readline().replace('\n', '').strip()
stpr = lambda x: stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
from collections import Counter, defaultdict
for _ in range(I()):
	d = defaultdict(int)
	(r, b, g, w) = tup()
	if r + b + g + w == 0:
		print('Yes')
		continue
	pk = [r, b, g, w]
	(od, ev) = (0, 0)
	for i in pk:
		if i == 0:
			pass
		if i % 2:
			od += 1
		else:
			ev += 1
	if od <= 1:
		print('Yes')
	elif min(r, b, g) >= 1:
		arr = [r - 1, b - 1, g - 1, w + 1]
		(od, ev) = (0, 0)
		for i in arr:
			if i == 0:
				pass
			if i % 2:
				od += 1
			else:
				ev += 1
		if od <= 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
result = []
for i in range(t):
	k = input().split()
	l = []
	sum = 0
	min = pow(10, 9)
	for j in range(4):
		l.append(int(k[j]))
		sum += l[j] % 2
	if sum == 0 or sum == 1:
		result.append('Yes')
	else:
		sum = 0
		for j in range(3):
			if l[j] < min:
				min = l[j]
			l[j] -= 1
			sum += l[j] % 2
		l[3] += 1
		sum += l[3] % 2
		if min > 0 and (sum == 0 or sum == 1):
			result.append('Yes')
		else:
			result.append('No')
for i in range(t):
	print(result[i])


def validPalidrome(a, b, c, d):
	count = 0
	if a & 1 != 0:
		count += 1
	if b & 1 != 0:
		count += 1
	if c & 1 != 0:
		count += 1
	if d & 1 != 0:
		count += 1
	if min(a, b, c, d) == 0:
		if count != 1 and count != 0:
			return False
		else:
			return True
	elif count == 2:
		return False
	else:
		return True

def main():
	t = int(input())
	for i in range(t):
		(r, g, b, w) = map(int, input().split())
		m = min(r, g, b)
		if m == 0:
			print('Yes') if validPalidrome(r, g, b, w) else print('No')
		elif r & 1 != 0 and g & 1 != 0 and (b & 1 != 0):
			print('Yes')
		elif validPalidrome(r, g, b, w):
			print('Yes')
		else:
			print('No')
main()


import math
for test in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	p = 0
	if p == 1:
		p = 2
	else:
		x = 0
		if a % 2 != 0:
			x += 1
		if b % 2 != 0:
			x += 1
		if c % 2 != 0:
			x += 1
		if d % 2 != 0:
			x += 1
		if x <= 1:
			print('Yes')
		else:
			x = 0
			if a > 0 and b > 0 and (c > 0):
				a = a - 1
				d = d + 1
				b = b - 1
				d = d + 1
				c = c - 1
				d = d + 1
				if a % 2 != 0:
					x += 1
				if b % 2 != 0:
					x += 1
				if c % 2 != 0:
					x += 1
				if d % 2 != 0:
					x += 1
				if x <= 1:
					print('Yes')
				else:
					print('No')
			else:
				print('No')


for x in range(int(input())):
	(r, g, b, w) = list(map(int, input().split()))
	if w % 2 == 1:
		odds = 0
		if r % 2 == 1:
			odds += 1
		if g % 2 == 1:
			odds += 1
		if b % 2 == 1:
			odds += 1
		if odds == 1:
			print('NO')
		elif (r == 0 or g == 0 or b == 0) and odds >= 1:
			print('NO')
		else:
			print('YES')
	else:
		odds = 0
		if r % 2 == 1:
			odds += 1
		if g % 2 == 1:
			odds += 1
		if b % 2 == 1:
			odds += 1
		if odds == 2:
			print('NO')
		else:
			print('YES')


j = int(input())
for i in range(j):
	(r, g, b, w) = map(int, input().split())
	if r * g * b == 0:
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			print('YES')
		else:
			print('NO')
	elif r % 2 + g % 2 + b % 2 + w % 2 == 2:
		print('NO')
	else:
		print('YES')


from collections import Counter
n = int(input())
for _ in range(n):
	arr = list(map(int, input().split()))
	dp = min([arr[0], arr[1], arr[2]])
	som = map(lambda x: x % 2, arr)
	mp = Counter(som)
	if mp[0] == 4 or (mp[0] == 1 and dp > 0) or (mp[0] == 0 and dp > 0) or (mp[1] == 1):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(x, y, z, w) = map(int, input().split())
	if x == 0 or y == 0 or z == 0:
		oddcount = 0
		if x != 0 and x % 2 != 0:
			oddcount += 1
		if y != 0 and y % 2 != 0:
			oddcount += 1
		if z != 0 and z % 2 != 0:
			oddcount += 1
		if w != 0 and w % 2 != 0:
			oddcount += 1
		if oddcount <= 1:
			print('YES')
		else:
			print('NO')
	else:
		oddcount = 0
		if x != 0 and x % 2 != 0:
			oddcount += 1
		if y != 0 and y % 2 != 0:
			oddcount += 1
		if z != 0 and z % 2 != 0:
			oddcount += 1
		if w != 0 and w % 2 != 0:
			oddcount += 1
		if oddcount == 2:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if (a + b + c + d) % 2 == 0:
		if not a % 2 == b % 2 == c % 2:
			print('No')
		else:
			print('Yes')
	elif a == 0 or b == 0 or c == 0:
		if a % 2 + b % 2 + c % 2 + d % 2 != 1:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


def main():
	for _ in range(int(input())):
		(r, g, b, w) = map(int, input().split())
		m = min(r, g, b)
		rgbo = bool(r & 1) + bool(g & 1) + bool(b & 1)
		if rgbo == 0:
			print('Yes')
		elif rgbo == 1:
			print('Yes' if ~w & 1 else 'No')
		elif rgbo == 2:
			print('Yes' if 0 < m and w & 1 else 'No')
		else:
			print('Yes' if 0 < m else 'No')
main()


def fun(lst):
	neven = 0
	for i in lst:
		if i % 2 == 0:
			neven += 1
	if neven > 2:
		return 'Yes'
	elif lst[0] > 0 and lst[1] > 0 and (lst[2] > 0) and (4 - neven > 2):
		lst[0] -= 1
		lst[1] -= 1
		lst[2] -= 1
		lst[3] += 3
		return fun(lst)
	else:
		return 'No'
for _ in range(int(input().strip())):
	lst = list(map(int, input().strip().split()))
	res = fun(lst)
	print(res)


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	n = r + g + b + w
	count = 0
	zero = 0
	for j in (r, g, b, w):
		if j % 2 != 0:
			count += 1
	for j in (r, g, b):
		if j == 0:
			zero += 1
	if n % 2 == 0:
		if zero > 0 and count > 0:
			print('NO')
		elif count == 0 or count == 4:
			print('YES')
		else:
			print('NO')
	elif zero > 0 and count != 1:
		print('NO')
	elif count == 1 or count == 3:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b, c, w) = map(int, input().strip().split(' '))
	lst = [a, b, c]
	odd_count = 0
	zeros = 0
	for i in range(3):
		if lst[i] % 2 != 0:
			odd_count += 1
		elif lst[i] == 0:
			zeros += 1
	if w % 2 == 0:
		if odd_count <= 1:
			print('yes')
		elif odd_count == 3:
			print('yes')
		elif odd_count == 2:
			print('no')
	elif w % 2 != 0:
		if odd_count == 0 or odd_count == 3:
			print('yes')
		elif odd_count == 1:
			print('no')
		elif odd_count == 2:
			if zeros == 0:
				print('yes')
			else:
				print('no')


import sys
stdin = sys.stdin
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
ns = lambda : stdin.readline().rstrip()
T = ni()
for _ in range(T):
	(r, g, b, w) = na()
	ec = 0
	mn = min(r, g, b)
	if r % 2 == 0:
		ec += 1
	if g % 2 == 0:
		ec += 1
	if b % 2 == 0:
		ec += 1
	w0 = w % 2 == 0
	if ec == 3 or (ec == 2 and w0):
		print('Yes')
	elif ec == 1 and (not w0) and (mn > 0):
		print('Yes')
	elif ec == 0 and mn > 0:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(r, g, b, w) = map(int, input().split())
	color = [r, g, b, w]
	numOdd = 0
	for i in color:
		if i % 2 != 0:
			numOdd += 1
	if numOdd <= 1:
		print('Yes')
	elif r == 0 or g == 0 or b == 0:
		print('No')
	elif numOdd == 2:
		print('No')
	else:
		print('Yes')


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def sumDigits(no):
	return 0 if no == 0 else int(no % 10) + sumDigits(int(no / 10))
MOD = 1000000007
PMOD = 998244353
N = 10 ** 5
T = 1
T = int(stdin.readline())
for _ in range(T):
	(r, g, b, w) = list(map(int, stdin.readline().rstrip().split()))
	e = (r % 2 == 0) + (g % 2 == 0) + (b % 2 == 0) + (w % 2 == 0)
	if e == 3 or e == 4:
		print('Yes')
	elif e == 2:
		print('No')
	elif r > 0 and g > 0 and (b > 0):
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = intIn()
while t > 0:
	t -= 1
	a = listIn()
	cnt = 0
	li = []
	for x in a:
		if x % 2 == 0:
			li.append(x)
			cnt += 1
	if cnt == 4 or cnt == 0 or cnt == 3:
		print('Yes')
	elif cnt == 2:
		print('NO')
	elif a[-1] % 2 == 0:
		print('Yes')
	elif li[0] > 0:
		print('Yes')
	else:
		print('No')


T = int(input())
for _ in range(T):
	(r, g, b, w) = map(int, input().split())
	if r == 0 and g == 0 and (b == 0):
		print('Yes')
	elif r == 0 and g % 2 == 0 and (b % 2 == 0):
		print('Yes')
	elif r % 2 == 0 and g == 0 and (b % 2 == 0):
		print('Yes')
	elif r % 2 == 0 and g % 2 == 0 and (b == 0):
		print('Yes')
	elif r > 0 and g > 0 and (b > 0):
		if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0):
			print('Yes')
		elif r % 2 != 0 and g % 2 != 0 and (b % 2 != 0):
			print('Yes')
		else:
			(odd, even) = (0, 0)
			if r % 2 == 0:
				even += 1
			else:
				odd += 1
			if g % 2 == 0:
				even += 1
			else:
				odd += 1
			if b % 2 == 0:
				even += 1
			else:
				odd += 1
			if odd == 2 and w % 2 != 0:
				print('Yes')
			elif even == 2 and w % 2 == 0:
				print('Yes')
			else:
				print('No')
	elif r == 0 and g == 0 and (b == 0) and (w == 0):
		print('No')
	elif r == 0 and g != 0 and (b == 0):
		if g % 2 == 0:
			print('Yes')
		elif w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif r == 0 and g == 0 and (b != 0):
		if b % 2 == 0:
			print('Yes')
		elif w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif r != 0 and g == 0 and (b == 0):
		if r % 2 == 0:
			print('Yes')
		elif w % 2 == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input().split()[0])
for case in range(t):
	(r, g, b, w) = map(int, input().split())
	rgbp = r % 2 + g % 2 + b % 2
	wp = w % 2
	if r == 0 or g == 0 or b == 0:
		if rgbp + wp <= 1:
			print('Yes')
		else:
			print('No')
	elif rgbp + wp <= 1 or 4 - rgbp - wp <= 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(r, g, b, w) = [int(x) for x in input().split()]
	p = r == 0 or g == 0 or b == 0
	rr = r % 2 == 0
	gg = g % 2 == 0
	bb = b % 2 == 0
	ww = w % 2 == 0
	l = [rr, gg, bb, ww]
	if l.count(False) == 2 or (l.count(False) == 3 and p):
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if (a + b + c + d) % 2 == 0:
		if a == b == c:
			print('Yes')
		elif a % 2 == b % 2 == c % 2 == d % 2:
			print('Yes')
		else:
			print('No')
	elif a == b == c:
		print('Yes')
	elif a % 2 == b % 2 == c % 2:
		print('Yes')
	else:
		ss = [a % 2, b % 2, c % 2]
		dd = ss.count(1)
		if dd == 1:
			if d % 2 == 0:
				print('Yes')
			else:
				print('No')
		elif min(a, b, c) != 0 and d % 2 == 1:
			print('Yes')
		else:
			print('No')


def solve():
	(r, g, b, w) = map(int, input().split())
	if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
		return 'Yes'
	if min(r, g, b) >= 1:
		(r, g, b, w) = (r - 1, g - 1, b - 1, w + 3)
		if r % 2 + g % 2 + b % 2 + w % 2 <= 1:
			return 'Yes'
	return 'No'
n = int(input())
for i in range(n):
	print(solve())


n = int(input())
data = []
for _ in range(n):
	data.append(list(map(int, input().strip().split())))
for i in data:
	values = []
	num_even = 0
	for j in i:
		if j % 2 == 0:
			values.append(('even', j))
			num_even += 1
		else:
			values.append(('odd', j))
	if num_even >= 3:
		print('Yes')
	elif num_even == 2:
		print('No')
	else:
		new_values = i[:3]
		if 0 in new_values:
			print('No')
		else:
			print('Yes')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		(r, g, b, w) = list(map(int, input().split()))
		odd = 0
		for ele in [r, g, b, w]:
			if ele % 2:
				odd += 1
		if odd <= 1:
			yield 'Yes'
		else:
			minm = min(r, g, b)
			if minm == 1:
				odd = 0
				for ele in [r - 1, g - 1, b - 1, w + 3]:
					if ele % 2:
						odd += 1
				if odd <= 1:
					yield 'Yes'
				else:
					yield 'No'
			elif minm >= 2:
				odd1 = 0
				for ele in [r - 1, g - 1, b - 1, w + 3]:
					if ele % 2:
						odd1 += 1
				odd2 = 0
				for ele in [r - 2, g - 2, b - 2, w + 6]:
					if ele % 2:
						odd2 += 1
				if odd1 <= 1 or odd2 <= 1:
					yield 'Yes'
				else:
					yield 'No'
			else:
				yield 'No'
t = int(input())
ans = gift()
print(*ans, sep='\n')


def count(r, g, b, w):
	odd = 0
	if r % 2 != 0:
		odd += 1
	if g % 2 != 0:
		odd += 1
	if b % 2 != 0:
		odd += 1
	return odd
t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	odd = count(r, g, b, w)
	if odd == 0 or odd == 3 or (odd == 1 and w % 2 == 0):
		print('Yes')
	elif odd == 2 and w % 2 != 0:
		if r > 0 and b > 0 and (g > 0):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def good(r, g, b, w):
	n = r + g + b + w
	even = 0
	for i in (r, g, b, w):
		if i % 2 == 0:
			even += 1
	if n % 2 == 0:
		if even != 4:
			return False
		return True
	else:
		if even != 3:
			return False
		return True

def solve(r, g, b, w, ans):
	for i in range(min(10, r, g, b) + 1):
		if good(r - i, g - i, b - i, w + 3 * i):
			ans.append('Yes')
			return
	ans.append('No')

def main():
	t = int(input())
	ans = []
	for i in range(t):
		(r, g, b, w) = map(int, input().split())
		solve(r, g, b, w, ans)
	print('\n'.join(ans))
main()


for _ in range(int(input())):
	ar = list(map(int, input().split()))
	even = 0
	for i in ar:
		if i % 2 == 0:
			even += 1
	if even >= 3 or even == 0:
		print('YES')
	elif even == 1 and min(ar[0:3]) != 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	l = list(map(int, input().split()))
	(e, o) = (0, 0)
	for i in l:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e == 4 or e == 3:
		print('Yes')
	elif e == 2:
		print('No')
	elif l[0] == 0 or l[1] == 0 or l[2] == 0:
		print('No')
	else:
		print('Yes')
	t -= 1


for i in range(int(input())):
	a = [int(i) for i in input().split()]
	s = min(a[:3])
	op = 0
	ep = 0
	for i in a:
		if i % 2:
			op += 1
		else:
			ep += 1
	if min(op, ep) > 1:
		ans = 'No'
	elif s == 0 and min(op, ep) == ep:
		ans = 'No'
	else:
		ans = 'Yes'
	print(ans)


import sys
import math, bisect
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	(r, g, b, w) = neo()
	t = 0
	if r % 2 != 0:
		t += 1
	if g % 2 != 0:
		t += 1
	if b % 2 != 0:
		t += 1
	if t == 1 and w % 2 != 0 or (t == 2 and w % 2 == 0) or (t == 2 and (r == 0 or g == 0 or b == 0)) or (t == 3 and (r == 0 or g == 0 or b == 0)):
		print('No')
	else:
		print('Yes')


t = int(input())
while t:
	t -= 1
	(r, g, b, w) = map(int, input().split())
	mot = r + g + b + w
	if not mot % 2:
		if r % 2 == g % 2 == b % 2 == w % 2:
			print('Yes')
		else:
			print('No')
	else:
		l = [r, g, b, w]
		o = 0
		for i in l:
			if i % 2:
				o += 1
		if o == 3:
			if not w % 2:
				print('Yes')
			elif min(r, g, b):
				print('Yes')
			else:
				print('No')
		elif o == 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	if r == 0 and g == 0 and (b == 0):
		if w == 0 or w != 0:
			print('YES')
	elif r == 0 or g == 0 or b == 0:
		odcnt = 0
		l = [r, g, b, w]
		for i in l:
			if i % 2 != 0:
				odcnt += 1
		if odcnt > 1:
			print('NO')
		else:
			print('YES')
	else:
		odcnt = 0
		l = [r, g, b, w]
		for i in l:
			if i % 2 != 0:
				odcnt += 1
		if odcnt == 2:
			print('NO')
		else:
			print('YES')


from sys import stdin, stdout
from math import sqrt, gcd, ceil, floor, log2, log10, factorial, cos, acos, tan, atan, atan2, sin, asin, radians, degrees, hypot
from bisect import insort, insort_left, insort_right, bisect_left, bisect_right, bisect
from array import array
from functools import reduce
from itertools import combinations, combinations_with_replacement, permutations
from fractions import Fraction
from random import choice, getrandbits, randint, random, randrange, shuffle
from re import compile, findall, escape
from statistics import mean, median, mode
from heapq import heapify, heappop, heappush, heappushpop, heapreplace, merge, nlargest, nsmallest
for test in range(int(stdin.readline())):
	(r, g, b, w) = map(int, input().split())
	if r > 0 and b > 0 and (g > 0):
		total = r + b + g
		if total % 2 == 0:
			if [r % 2, b % 2, g % 2].count(1) == 2:
				if w % 2 == 1:
					print('YES')
				else:
					print('NO')
			else:
				print('YES')
		elif [r % 2, b % 2, g % 2].count(1) == 3:
			print('YES')
		elif w % 2 == 1:
			print('NO')
		else:
			print('YES')
	elif r == 0 and b == 0 and (g == 0):
		print('YES')
	elif [r == 0, b == 0, g == 0].count(True) == 2:
		s = r + b + g
		if s % 2 == 0:
			print('YES')
		elif w % 2 == 0:
			print('YES')
		else:
			print('NO')
	else:
		l = []
		if r > 0:
			l.append(r)
		if g > 0:
			l.append(g)
		if b > 0:
			l.append(b)
		(x, y) = (l[0], l[1])
		if x % 2 == 0 and y % 2 == 0:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	flag = True
	x = list(map(int, input().split()))
	newx = list(map(lambda x: x % 2, x))
	if sum(x) == 1:
		print('YES')
	elif newx.count(0) >= 3:
		print('YES')
	elif newx.count(1) >= 3 and (not 0 in x[:3]):
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	(r, g, b, w) = [int(x) for x in input().split()]
	max_turns = min(r, g, b)
	even = lambda x: (x + 1) % 2
	evens = 0
	evens += even(r)
	evens += even(g)
	evens += even(b)
	if evens == 3:
		print('Yes')
	elif evens == 2 and w % 2 == 0:
		print('Yes')
	elif evens == 1 and w % 2 == 1 and (max_turns > 0):
		print('Yes')
	elif evens == 0 and max_turns > 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	c = list(map(int, input().split()))
	(o, e) = (0, 0)
	for i in c:
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if c[0] == 0 or c[1] == 0 or c[2] == 0:
		if o > 1:
			print('No')
		else:
			print('Yes')
	elif o == 2:
		print('No')
	else:
		print('Yes')


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	a = lInt()
	b = a[0] % 2 + a[1] % 2 + a[2] % 2 + a[3] % 2
	c = 0
	if b == 0 or b == 1:
		print('YES')
	elif c not in a[:3]:
		for i in range(3):
			a[i] -= 1
		a[3] += 3
		b = a[0] % 2 + a[1] % 2 + a[2] % 2 + a[3] % 2
		if b == 1 or b == 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


def main():
	t = int(input())
	for _ in range(t):
		s = list(map(int, input().split()))
		if s[0] == 0 and s[1] % 2 == 1 and (s[2] % 2 == 1) and (s[3] % 2 == 1):
			print('No')
		elif s[1] == 0 and s[0] % 2 == 1 and (s[2] % 2 == 1) and (s[3] % 2 == 1):
			print('No')
		elif s[2] == 0 and s[1] % 2 == 1 and (s[0] % 2 == 1) and (s[3] % 2 == 1):
			print('No')
		else:
			k = 0
			for i in s:
				if i % 2 == 1:
					k += 1
			if k == 2:
				print('No')
			else:
				print('Yes')
main()


def check(l):
	cnt = 0
	for i in range(4):
		if l[i] & 1 == 0:
			cnt += 1
	return cnt
for _ in range(int(input())):
	cnt = 0
	(r, g, b, w) = map(int, input().split())
	while r >= 0 and g >= 0 and (b >= 0) and (w >= 0):
		cnt += 1
		if cnt > 3:
			print('No')
			break
		if check([r, g, b, w]) >= 3:
			print('Yes')
			break
		r -= 1
		g -= 1
		b -= 1
		w += 3
	else:
		print('No')


def maink():
	(g, r, b, w) = input().split()
	(g, r, b, w) = (int(g), int(r), int(b), int(w))
	rem = []
	rem.append(g % 2)
	rem.append(r % 2)
	rem.append(b % 2)
	rem.append(w % 2)
	if rem.count(1) <= 1:
		return 'Yes'
	else:
		if g > 0 and r > 0 and (b > 0):
			g -= 1
			r -= 1
			b -= 1
			w += 3
			rem = []
			rem.append(g % 2)
			rem.append(r % 2)
			rem.append(b % 2)
			rem.append(w % 2)
			if rem.count(1) <= 1:
				return 'Yes'
			return 'No'
		return 'No'
c = []
t = int(input())
for i in range(t):
	c.append(maink())
for k in c:
	print(k)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	a = 0
	b = 0
	c = 1
	li = stdin.readline().split()
	for i in range(3):
		if int(li[i]) % 2 == 0:
			even = int(li[i])
			a += 1
		else:
			b += 1
	if int(li[3]) % 2 == 0:
		c = 0
	ans = 100 * a + 10 * b + c
	if ans == 121 and even == 0:
		stdout.write('No\n')
	elif ans == 211 or ans == 120:
		stdout.write('No\n')
	else:
		stdout.write('Yes\n')


import sys
from collections import defaultdict as dd
from collections import deque
from functools import *
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def inc(d, c):
	d[c] = d[c] + 1 if c in d else 1

def li():
	return [int(xx) for xx in input().split()]

def fli():
	return [float(x) for x in input().split()]

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for xx in input().split()]

def fi():
	return int(input())

def pro(a):
	return reduce(lambda a, b: a * b, a)

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def isvalid(i, j):
	return 0 <= i < n and 0 <= j < n

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)
t = fi()
while t > 0:
	t -= 1
	(r, g, b, w) = mi()
	d = [r % 2, g % 2, b % 2, w % 2]
	l = []
	if [r, g, b].count(0):
		l = [1, 1, 1, 1]
	else:
		for i in d:
			l.append(i ^ 1)
	if d.count(0) >= 3 or l.count(0) >= 3:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(r, g, b, w) = [int(u) for u in input().split(' ')]
	if r * g * b == 0:
		(r, g, b, w) = [r % 2, g % 2, b % 2, w % 2]
		if r + g + b + w > 1:
			print('NO')
		else:
			print('YES')
	else:
		(r, g, b, w) = [r % 2, g % 2, b % 2, w % 2]
		if r + g + b + w != 2:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	(r, g, b, w) = map(int, input().split())
	ans = [r % 2, g % 2, b % 2, w % 2]
	cnt = ans.count(0)
	if cnt >= 3 or cnt == 0:
		print('Yes')
	elif cnt == 1:
		if ans[3] == 0 or (r > 0 and g > 0 and (b > 0)):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def fun(l):
	c = 0
	for i in l:
		if i % 2 == 0:
			c += 1
	return c
for _ in range(int(input())):
	l = list(map(int, input().split()))
	if fun(l) > 2:
		print('Yes')
	elif l[0] > 0 and l[1] > 0 and (l[2] > 0):
		l[0] -= 1
		l[1] -= 1
		l[2] -= 1
		l[3] += 3
		if fun(l) > 2:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for i in range(int(input())):
	inu = [int(i) for i in input().split()]
	min = -1
	for i in range(3):
		if min > inu[i] or min == -1:
			min = inu[i]
	imp = 0
	for i in inu:
		if i % 2 == 1:
			imp += 1
	if imp == 0 or imp == 1 or (imp == 3 and min >= 1) or (imp == 4 and min >= 1):
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	c = 0
	for i in range(4):
		if a[i] % 2 == 1:
			c += 1
	if c == 2 or (min(a[:3]) == 0 and c > 1):
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	a = r % 2 + g % 2 + b % 2 + w % 2
	if a in (4, 0, 1) or (a == 3 and 0 not in (r, g, b)):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	arr = list(map(int, input().split()))
	(odd, even) = (0, 0)
	for x in arr:
		if x % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd <= 1:
		print('Yes')
		continue
	if 0 in arr[:3]:
		print('No')
		continue
	arr[3] += 1
	arr[2] -= 1
	arr[1] -= 1
	arr[0] -= 1
	(odd, even) = (0, 0)
	for x in arr:
		if x % 2 == 0:
			even += 1
		else:
			odd += 1
	if odd <= 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	v = [r, g, b, w]
	even = 0
	odd = 0
	for i in v:
		if i % 2 == 0:
			even += 1
		else:
			odd += 1
	if even >= 3:
		print('Yes')
	else:
		flag = 0
		cnt = 0
		while r and g and b and (cnt < 4):
			r -= 1
			g -= 1
			b -= 1
			w += 3
			v = [r, g, b, w]
			even = 0
			odd = 0
			for i in v:
				if i % 2 == 0:
					even += 1
				else:
					odd += 1
			if even >= 3:
				print('Yes')
				flag = 1
				break
			cnt += 1
		if not flag:
			print('No')


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())
sys.setrecursionlimit(1500)

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		l = list(In())
		odd = 0
		for x in l:
			if x & 1 == 1:
				odd += 1
		if odd <= 1:
			print('Yes')
			return
		if min(l[0], l[1], l[2]) == 0:
			odd = 0
			for x in l:
				if x & 1 == 1:
					odd += 1
			if odd <= 1:
				print('Yes')
			else:
				print('No')
		else:
			for x in range(3):
				l[x] -= 1
			l[-1] += 3
			odd = 0
			for x in l:
				if x & 1 == 1:
					odd += 1
			if odd <= 1:
				print('Yes')
			else:
				print('No')
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	inputs = [int(x) for x in input().split()]
	mod2 = [x % 2 for x in inputs]
	n_moves = min(inputs[0:3])
	if_work = False
	if sum(mod2) <= 1:
		if_work = True
	if n_moves >= 1 and sum(mod2) >= 3:
		if_work = True
	print('Yes' if if_work else 'No')


def isReducible(r, g, b):
	if r > 0 and g > 0 and (b > 0):
		return True
	return False
n = input()
n = int(n)
for i in range(n):
	line = input().split(' ')
	int_line = list(map(int, line))
	odd = 0
	even = 0
	for j in range(3):
		if int_line[j] % 2 == 0:
			even += 1
		else:
			odd += 1
	if even == 3:
		print('YES')
		continue
	elif odd == 3:
		if isReducible(*int_line[0:3]):
			print('YES')
			continue
	elif even == 2:
		if int_line[3] % 2 == 0:
			print('YES')
			continue
	elif int_line[3] % 2 == 1:
		if isReducible(*int_line[0:3]):
			print('YES')
			continue
	print('NO')


n = int(input())
answer = []
for test in range(n):
	bool = False
	entry = [int(element) for element in input().split(' ')]
	parity0 = sum([element % 2 for element in entry])
	parity1 = sum([(element + 1) % 2 for element in entry])
	if parity0 == 0 or parity0 == 1:
		bool = True
	elif entry[:3].count(0) == 0:
		if parity1 == 0 or parity1 == 1:
			bool = True
	if bool:
		answer.append('Yes')
	else:
		answer.append('No')
print('\n'.join(answer))


from math import *
t = int(input())
while t:
	t = t - 1
	(r, g, b, w) = map(int, input().split())
	odd = 0
	odd1 = 0
	flag = 1
	if r % 2:
		odd += 1
	if g % 2:
		odd += 1
	if b % 2:
		odd += 1
	if w % 2:
		odd1 += 1
	od = odd + odd1
	cnt = 0
	if r == 0:
		cnt += 1
	if g == 0:
		cnt += 1
	if b == 0:
		cnt += 1
	if od == 1 or od == 4 or od == 0 or (odd == 0 and odd1 == 1) or (odd == 2 and odd1 == 1 and (cnt == 0)) or (odd == 3):
		print('YES')
	else:
		print('NO')


def ok(r, g, b, w):
	(r1, g1, b1, w1) = (r % 2 == 1, g % 2 == 1, b % 2 == 1, w % 2 == 1)
	if s % 2 == 1:
		if r1 and (not g1) and (not b1) and (not w1) or (g1 and (not r1) and (not b1) and (not w1)) or (b1 and (not g1) and (not r1) and (not w1)) or (w1 and (not g1) and (not b1) and (not r1)):
			return True
		return False
	else:
		if not r1 and (not g1) and (not b1) and (not w1):
			return True
		return False
tests = int(input())
for test in range(tests):
	(r, g, b, w) = map(int, input().split())
	s = r + g + b + w
	c = min([r, g, b])
	if ok(r, g, b, w):
		print('Yes')
	elif c > 0:
		r -= 1
		g -= 1
		b -= 1
		w += 3
		if ok(r, g, b, w):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


x = int(input())
for i in range(x):
	(p, q, r, s) = map(int, input().split())
	if p % 2 + q % 2 + r % 2 + s % 2 <= 1:
		print('Yes')
		continue
	t = min(p, q, r)
	p -= t
	q -= t
	r -= t
	s += 3 * t
	if p % 2 + q % 2 + r % 2 + s % 2 <= 1:
		print('Yes')
		continue
	p += t
	q += t
	r += t
	s -= 3 * t
	if p % 2 + q % 2 + r % 2 == 2 and s % 2 == 1 and (p > 0) and (q > 0) and (r > 0):
		print('Yes')
		continue
	print('No')


t = int(input())
while t != 0:
	t -= 1
	flag = 0
	a = list(map(int, input().split()))
	e = 0
	o = 0
	if a[0] % 2 == 0:
		e += 1
	else:
		o += 1
	if a[1] % 2 == 0:
		e += 1
	else:
		o += 1
	if a[2] % 2 == 0:
		e += 1
	else:
		o += 1
	if a[3] % 2 == 0:
		e += 1
	else:
		o += 1
	if e == 2 or (min([a[0], a[1], a[2]]) == 0 and o == 3):
		print('NO')
	else:
		print('YES')


t = int(input())

def even(N):
	return not N & 1

def odd(N):
	return N & 1

def transform(state, op):
	new_state = []
	for it in state:
		new_state.append(it - op)
	return new_state

def D1(state):
	odd_cnt = 0
	for it in state:
		odd_cnt += odd(it)
	return odd_cnt == 0

def D2(state):
	odd_cnt = 0
	for it in state:
		odd_cnt += odd(it)
	return odd_cnt == 1

def possible(state, op):
	new_state = []
	for it in state:
		new_state.append(it - op)
	return new_state[0] >= 0 and new_state[1] >= 0 and (new_state[2] >= 0)
while t > 0:
	YES = False
	(r, g, b, w) = map(int, input().split())
	state = [r, g, b]
	if possible(state, 0):
		new_state = transform(state, 0)
		if D1(new_state):
			YES = True
		elif D2(new_state) and even(w):
			YES = True
	if possible(state, 1):
		new_state = transform(state, 1)
		if D1(new_state):
			YES = True
		elif D2(new_state) and odd(w):
			YES = True
	if YES:
		print('Yes')
	else:
		print('No')
	t -= 1


t = int(input())
while t:
	arr = list(map(int, input().split()))
	q = 0
	ans = 'No'
	w = 0
	e = 0
	for i in arr:
		if i % 2:
			q += 1
	if q == 0 or q == 1:
		ans = 'Yes'
	for j in arr[:3]:
		if j % 2 == 0:
			w += 1
		if j:
			e += 1
	if arr[-1] % 2 == 0 and e == 3:
		w += 1
	if w == 0 or (w == 1 and e == 3):
		ans = 'Yes'
	print(ans)
	t -= 1


import sys
buff_readline = sys.stdin.readline
readline = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(buff_readline())

def read_int_n():
	return list(map(int, buff_readline().split()))

def read_float():
	return float(buff_readline())

def read_float_n():
	return list(map(float, buff_readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

def slv(RGBW):
	if sum(RGBW) % 2 == 0:
		if all(map(lambda x: x % 2 == 0, RGBW)):
			return 'Yes'
		elif all(map(lambda x: x % 2 == 1, RGBW)):
			return 'Yes'
		else:
			return 'No'
	elif all(map(lambda x: x % 2 == 0, RGBW)):
		return 'Yes'
	elif len(list(filter(lambda x: x % 2 == 0, RGBW))) == 3:
		return 'Yes'
	elif len(list(filter(lambda x: x % 2 == 1, RGBW))) == 3 and len(list(filter(lambda x: x != 0, RGBW[:3]))) == 3:
		return 'Yes'
	else:
		return 'No'

def main():
	for _ in range(read_int()):
		RGBW = read_int_n()
		print(slv(RGBW))
main()


T = int(input())
totalnums = []
for i in range(T):
	nums = input().split(' ')
	nums = [int(x) for x in nums]
	totalnums.append(nums)
for i in range(T):
	nums = totalnums[i]
	good = False
	numodd = 0
	numeven = 0
	for j in range(4):
		if nums[j] % 2 == 0:
			numeven += 1
		else:
			numodd += 1
	if numodd <= 1:
		good = True
	if nums[0] > 0 and nums[1] > 0 and (nums[2] > 0):
		if numeven <= 1:
			good = True
	if good == True:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	a = list(map(int, input().split()))
	odd = 0
	for ai in a:
		if ai % 2 == 1:
			odd += 1
	if a.count(0) != 0:
		if a.count(0) == 1 and a[3] == 0:
			print('Yes')
		else:
			print('Yes' if odd <= 1 else 'No')
	else:
		print('No' if odd == 2 else 'Yes')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	a = 0
	b = 0
	for j in l:
		if j % 2:
			b += 1
		else:
			a += 1
	if a >= 3:
		print('Yes')
	elif a == 2:
		print('No')
	elif l[-1] % 2 == 0:
		print('Yes')
	elif 0 in l:
		print('No')
	else:
		print('Yes')


from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	t = list(map(int, input().split()))
	(e, o) = (0, 0)
	for i in t:
		if i & 1:
			o += 1
		else:
			e += 1
	if o == 1 or o == 0:
		print('Yes')
	elif (o == 4 or o == 3) and t[0] and t[1] and t[2]:
		print('Yes')
	else:
		print('No')


def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split(' ')))
for _ in range(read_int()):
	input_list = read_ints()
	values = list(map(lambda x: x & 1, input_list))
	if sum(values) == 0 or sum(values) == 1:
		print('Yes')
		continue
	if min(input_list[:3]).__ge__(1):
		print('No') if sum(values[:3]).__eq__(1) and sum(values[3:]).__eq__(1) or (sum(values[:3]).__eq__(2) and sum(values[3:]).__eq__(0)) else print('Yes')
	else:
		print('No')


N = int(input())
for i in range(N):
	(r, g, b, w) = map(int, input().split())
	k = r % 2 + g % 2 + b % 2 + w % 2
	if k <= 1 or (k >= 3 and r > 0 and (g > 0) and (b > 0)):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	n_odds = sum((v % 2 for v in [r, g, b, w]))
	if r == 0 or g == 0 or b == 0:
		print(('No', 'Yes')[n_odds <= 1])
	else:
		print(('No', 'Yes')[n_odds != 2])


for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	can_flip = all((e > 0 for e in [r, g, b]))
	res = sum((e & 1 for e in [r, g, b, w])) <= 1
	if can_flip:
		res |= sum((e & 1 ^ 1 for e in [r, g, b, w])) <= 1
	print(['No', 'Yes'][res])


def gt():
	return list(map(int, input().split()))

def ok(a):
	if min(a) < 0:
		return False
	cnt = sum([val % 2 for val in a])
	return cnt <= 1
for _ in range(*gt()):
	a = gt()
	if ok(a) or ok([a[0] - 1, a[1] - 1, a[2] - 1, a[3] + 3]):
		print('Yes')
	else:
		print('No')


def works(x):
	if sum((i % 2 for i in x)) <= 1:
		return True
	if x[0] >= 1 and x[1] >= 1 and (x[2] >= 1):
		x[0] -= 1
		x[1] -= 1
		x[2] -= 1
		x[3] += 3
	if sum((i % 2 for i in x)) <= 1:
		return True
	return False

def main():
	for _ in range(int(input())):
		x = list(map(int, input().split()))
		if works(x):
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	count = 0
	for i in range(4):
		if a[i] % 2 != 0:
			count += 1
	if count <= 1 or count == 4:
		print('YES')
	elif count == 3:
		aux = 0
		for i in range(3):
			if a[i] == 0:
				aux = 1
				break
		if aux == 1:
			print('NO')
		else:
			print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline

def inInt():
	return int(input())

def inStr():
	return input().strip('\n')

def inIList():
	return list(map(int, input().split()))

def inSList():
	return input().split()

def solve(a, b, c, d):
	c0 = 1 if a % 2 == 1 else 0
	c1 = 1 if b % 2 == 1 else 0
	c2 = 1 if c % 2 == 1 else 0
	c3 = 1 if d % 2 == 1 else 0
	if c0 + c1 + c2 + c3 <= 1:
		return 'Yes'
	if min(a, b, c) > 0:
		a = a - 1
		b = b - 1
		c = c - 1
		d = d + 3
		c0 = 1 if a % 2 == 1 else 0
		c1 = 1 if b % 2 == 1 else 0
		c2 = 1 if c % 2 == 1 else 0
		c3 = 1 if d % 2 == 1 else 0
		if c0 + c1 + c2 + c3 <= 1:
			return 'Yes'
	return 'No'
t = inInt()
for i in range(t):
	counts = inIList()
	print(solve(counts[0], counts[1], counts[2], counts[3]))


def countOdds(*args):
	count = 0
	for i in args:
		if i % 2 != 0:
			count += 1
	return count
t = int(input())
for _ in range(t):
	(r, g, b, w) = (int(i) for i in input().split())
	if all((r, g, b)):
		if countOdds(r, g, b, w) == 2:
			print('No')
		else:
			print('Yes')
	elif countOdds(r, g, b, w) < 2:
		print('Yes')
	else:
		print('No')


T = int(input())

def Is_Palin(r, g, b, w):
	Odd = 0
	if r % 2 != 0:
		Odd += 1
	if g % 2 != 0:
		Odd += 1
	if b % 2 != 0:
		Odd += 1
	if w % 2 != 0:
		Odd += 1
	if Odd > 1:
		return False
	return True
for i in range(T):
	(r, g, b, w) = map(int, input().split())
	if Is_Palin(r, g, b, w):
		print('Yes')
	else:
		Palin = False
		if r > 0 and b > 0 and (g > 0):
			(r, g, b, w) = (r - 1, g - 1, b - 1, w + 1)
		if Is_Palin(r, g, b, w):
			Palin = True
		if Palin:
			print('Yes')
		else:
			print('No')


T = int(input())
for case in range(T):
	(a, b, c, d) = map(int, input().split())
	odd = 0
	even = 0
	for i in [a, b, c, d]:
		if i % 2 == 1:
			odd += 1
		else:
			even += 1
	if a == 0 or b == 0 or c == 0:
		if odd > 1:
			print('NO')
		else:
			print('YES')
	elif odd == even:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	e = 0
	a = []
	a = list(map(int, input().strip().split()))
	for j in a:
		if j % 2 == 0:
			e += 1
	if e >= 3:
		print('Yes')
		continue
	elif 0 not in a[0:3] and e <= 1:
		print('Yes')
		continue
	else:
		print('No')


T = int(input())
for case in range(T):
	(r, g, b, w) = map(int, input().split())
	balls = [r, g, b, w]
	oddballs = len([i for i in balls if i % 2 == 1])
	if oddballs <= 1:
		print('YES')
	else:
		if r > 0 and g > 0 and (b > 0):
			balls = [r - 1, g - 1, b - 1, w + 3]
		oddballs = len([i for i in balls if i % 2 == 1])
		if oddballs <= 1:
			print('YES')
		else:
			print('NO')


from collections import defaultdict as dd
from sys import stdin, stdout
for t in range(int(stdin.readline().strip())):
	a = list(map(int, input().split()))
	c = 0
	if 0 in a[:-1]:
		for i in a:
			c += i & 1
		if c > 1:
			print('No')
		else:
			print('Yes')
		continue
	for i in a:
		c += i & 1
	if c == 2:
		print('No')
	else:
		print('Yes')


t = int(input())
while t:
	(r, g, b, w) = map(int, input().split())
	a = [r, g, b]
	c = list(filter(lambda x: x % 2 != 0, a))
	if r % 2 == 0 and g % 2 == 0 and (b % 2 == 0) or (r % 2 and g % 2 and b % 2):
		print('Yes')
	elif r == 0 or g == 0 or b == 0:
		if len(c) == 2:
			print('No')
		elif len(c) == 1 and w % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif len(c) == 2 and w % 2 != 0:
		print('Yes')
	elif len(c) == 2 and w % 2 == 0:
		print('No')
	elif len(c) == 1 and w % 2 == 0:
		print('Yes')
	elif len(c) == 1 and w % 2 != 0:
		print('No')
	t -= 1


t = int(input())
while t > 0:
	arr = [int(i) for i in input().split()]
	e = 0
	for i in arr:
		if i % 2 == 0:
			e += 1
	if e == 2 or (e < 2 and min(arr[:3]) == 0):
		print('No')
	else:
		print('Yes')
	t -= 1


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions
from collections import deque, defaultdict, OrderedDict
from fractions import Fraction
from decimal import Decimal

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(ri()):
		(r, g, b, w) = ria()
		a = [r, g, b, w]
		c = 0
		for i in a:
			if i % 2 != 0:
				c += 1
		if c <= 1:
			print('Yes')
		else:
			r -= 1
			g -= 1
			b -= 1
			w += 3
			a = [r, g, b, w]
			c = 0
			for i in a:
				if i % 2 != 0:
					c += 1
				if i < 0:
					c += 2
			if c <= 1:
				print('Yes')
			else:
				print('No')
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


def get_res(a, b, c, d):
	if a == 0 or b == 0 or c == 0:
		l = [x % 2 for x in [a, b, c, d]]
		odds = sum(l)
		if odds > 1:
			return 'No'
		else:
			return 'Yes'
	else:
		l = [x % 2 for x in [a, b, c, d]]
		odds = sum(l)
		if odds == 2:
			return 'No'
		else:
			return 'Yes'
n = int(input())
for _ in range(n):
	lis = list(map(lambda x: int(x), input().split()))
	print(get_res(*lis))


tests = int(input())
for t in range(tests):
	raw = input()
	A = list(map(int, list(raw.split())))
	(r, g, b, w) = (A[0], A[1], A[2], A[3])
	even = 0
	odd = 0
	if r % 2 == 0:
		even += 1
	else:
		odd += 1
	if g % 2 == 0:
		even += 1
	else:
		odd += 1
	if b % 2 == 0:
		even += 1
	else:
		odd += 1
	if w % 2 == 0:
		even += 1
	else:
		odd += 1
	if even == odd:
		print('No')
	elif even == 4 or even == 3:
		print('Yes')
	elif 0 in (r, g, b):
		print('No')
	else:
		print('Yes')


from fractions import Fraction
import bisect
import os
import io
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
from queue import Queue

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
t = 1
t = iinput()
for _ in range(t):
	(r, g, b, w) = rinput()
	odds = 0
	for i in [r, g, b, w]:
		if i % 2:
			odds += 1
	if min(r, g, b) == 0:
		print(['No', 'Yes'][odds <= 1])
	else:
		odds = 0
		for i in [r, g, b]:
			if i % 2:
				odds += 1
		if w % 2:
			print(['No', 'Yes'][odds == 0 or odds == 2 or odds == 3])
		else:
			print(['No', 'Yes'][odds <= 1 or odds == 3])


test_cases = int(input())

def solve(r, g, b, w):
	while True:
		e = 0
		if r % 2 == 0:
			e += 1
		if g % 2 == 0:
			e += 1
		if b % 2 == 0:
			e += 1
		if w % 2 == 0:
			e += 1
		if e == 4 or e == 3:
			print('Yes')
			return
		elif e == 1 or e == 0:
			if r - 1 >= 0 and g - 1 >= 0 and (b - 1 >= 0):
				print('Yes')
				return
			else:
				print('No')
				return
		else:
			print('No')
			return
for i in range(test_cases):
	[r, g, b, w] = list(map(int, input().split()))
	solve(r, g, b, w)


import sys

def solve(r, g, b, w):
	odd = 0
	for i in [r, g, b, w]:
		if i % 2 == 1:
			odd += 1
	if odd <= 1:
		return True
	if odd >= 3 and r * g * b > 0:
		return True
	return False
caseCount = int(next(sys.stdin))
for i in range(caseCount):
	x = next(sys.stdin)[:-1].split(' ')
	(r, g, b, w) = [int(j) for j in x]
	ans = solve(r, g, b, w)
	print(['No', 'Yes'][ans])


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def Ra():
	return map(int, open(0).read().split())

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()
show_flg = False
show_flg = True
ans = 0
for _ in range(I()):
	ans = 0
	x = LI()
	(a, b, c, d) = x
	q = 5
	p = sum([i % 2 for i in x])
	if a > 0 and b > 0 and (c > 0):
		q = sum([(i - 1) % 2 for i in x])
	Yn(p <= 1 or q <= 1)


import math
import sys
from collections import *
input = sys.stdin.readline
for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a > 0 and b > 0 and (c > 0):
		count = 0
		if a & 1:
			count += 1
		if b & 1:
			count += 1
		if c & 1:
			count += 1
		if d & 1:
			count += 1
		print('NO' if count == 2 else 'YES')
	else:
		count = 0
		if a & 1:
			count += 1
		if b & 1:
			count += 1
		if c & 1:
			count += 1
		if d & 1:
			count += 1
		print('YES' if count <= 1 else 'NO')


import sys
input = sys.stdin.readline
from bisect import bisect_left
from bisect import bisect_right
from math import ceil, factorial

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	(r, g, b, w) = int_array()
	mset = []
	for i in [r, g, b, w]:
		if i % 2 == 0:
			mset.append(1)
		else:
			mset.append(0)
	if mset.count(0) <= 1:
		print('Yes')
		continue
	if 0 in [r, g, b]:
		print('No')
		continue
	r -= 1
	g -= 1
	b -= 1
	w += 3
	mset = []
	for i in [r, g, b, w]:
		if i % 2 == 0:
			mset.append(1)
		else:
			mset.append(0)
	if mset.count(0) <= 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	l = [int(j) for j in input().split()]
	c = 0
	fl = 0
	for i in l:
		if i % 2 == 1:
			c += 1
	if c <= 1:
		fl = 1
	elif min(l[:3]) > 0:
		l[3] += 3
		(l[0], l[1], l[2]) = (l[0] - 1, l[1] - 1, l[2] - 1)
		c = 0
		for i in l:
			if i % 2 == 1:
				c += 1
		if c <= 1:
			fl = 1
		else:
			k1 = min(l[:3])
			l[3] += 3 * min(l[:3])
			(l[0], l[1], l[2]) = (l[0] - k1, l[1] - k1, l[2] - k1)
			c = 0
			for i in l:
				if i % 2 == 1:
					c += 1
			if c <= 1:
				fl = 1
	if fl == 1:
		print('Yes')
	else:
		print('No')


def ispossible(l):
	for i in range(4):
		l[i] = False if l[i] & 1 else True
	if l.count(True) == 4 or l.count(True) == 3:
		return True
	return False
for _ in range(int(input())):
	l = [int(c) for c in input().split()]
	b = l[:]
	if ispossible(l):
		print('Yes')
	elif b[0] == 0 or b[1] == 0 or b[2] == 0:
		print('No')
	else:
		b[0] -= 1
		b[1] -= 1
		b[2] -= 1
		b[3] += 3
		if ispossible(b):
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	a = [int(x) for x in input().split()]
	if a.count(0) != 0 and a[3] != 0:
		k = 0
		if a[0] % 2 != 0:
			k += 1
		if a[1] % 2 != 0:
			k += 1
		if a[2] % 2 != 0:
			k += 1
		if a[3] % 2 != 0:
			k += 1
		if k > 1:
			print('No')
		else:
			print('Yes')
	else:
		k = 0
		if a[0] % 2 == 0:
			k += 1
		if a[1] % 2 == 0:
			k += 1
		if a[2] % 2 == 0:
			k += 1
		if a[3] % 2 == 0:
			k += 1
		if k == 2:
			print('No')
		else:
			print('Yes')


import os
import sys
from io import BytesIO, IOBase
profile = 0
pypy = 1

def iin():
	return int(input())

def lin():
	return list(map(int, input().split()))

def main():
	T = iin()
	while T:
		T -= 1
		(r, g, b, w) = lin()
		(o, e) = (0, 0)
		o = r % 2 + g % 2 + b % 2 + w % 2
		e = 4 - o
		if e >= 3 or o > 3:
			print('yes')
			continue
		if r % 2 + g % 2 + b % 2 >= 3 or (o == 3 and r and g and b and w):
			print('yes')
			continue
		mn = min(r, g, b)
		w += mn * 3
		r -= mn
		g -= mn
		b -= mn
		if r % 2 + g % 2 + b % 2 == 0:
			print('yes')
			continue
		print('No')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if pypy:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
if profile:
	import cProfile
	cProfile.run('main()')
else:
	main()


import math
from collections import deque
from sys import stdin, stdout
from string import ascii_letters
input = stdin.readline
letters = ascii_letters[:26]
for _ in range(int(input())):
	(r, g, b, w) = map(int, input().split())
	for i in range(10):
		if r == 0 or g == 0 or b == 0:
			break
		r -= 1
		g -= 1
		b -= 1
		w += 3
		count = 0
		count += 1 if r % 2 else 0
		count += 1 if g % 2 else 0
		count += 1 if b % 2 else 0
		count += 1 if w % 2 else 0
		if count <= 1:
			break
	count = 0
	count += 1 if r % 2 else 0
	count += 1 if g % 2 else 0
	count += 1 if b % 2 else 0
	count += 1 if w % 2 else 0
	if not count <= 1:
		print('NO')
	else:
		print('YES')


x = int(input())
for _ in range(x):
	(r, g, b, w) = [int(x) for x in input().strip().split()]
	odds = 0
	if r % 2 == 1:
		odds += 1
	if g % 2 == 1:
		odds += 1
	if b % 2 == 1:
		odds += 1
	if w % 2 == 1:
		odds += 1
	if odds == 1:
		print('YES')
	elif odds == 0:
		print('YES')
	elif odds == 3:
		if r > 0 and g > 0 and (b > 0):
			print('YES')
		else:
			print('NO')
	elif odds == 4:
		if r > 0 and g > 0 and (b > 0):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')