The only difference between this problem and D2 is that you don't have to provide the way to construct the answer in this problem, but you have to do it in D2.

There's a table of $n \times m$ cells ($n$ rows and $m$ columns). The value of $n \cdot m$ is even.

A domino is a figure that consists of two cells having a common side. It may be horizontal (one of the cells is to the right of the other) or vertical (one of the cells is above the other).

You need to find out whether it is possible to place $\frac{nm}{2}$ dominoes on the table so that exactly $k$ of them are horizontal and all the other dominoes are vertical. The dominoes cannot overlap and must fill the whole table.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 10$) — the number of test cases. Then $t$ test cases follow.

Each test case consists of a single line. The line contains three integers $n$, $m$, $k$ ($1 \le n,m \le 100$, $0 \le k \le \frac{nm}{2}$, $n \cdot m$ is even) — the number of rows, columns and horizontal dominoes, respectively.


-----Output-----

For each test case output "YES", if it is possible to place dominoes in the desired way, or "NO" otherwise.

You may print each letter in any case (YES, yes, Yes will all be recognized as positive answer, NO, no and nO will all be recognized as negative answer).


-----Examples-----

Input
8
4 4 2
2 3 0
3 2 3
1 2 0
2 4 2
5 2 2
2 17 16
2 1 1
Output
YES
YES
YES
NO
YES
NO
YES
NO


-----Note-----

None

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: Mathematics

Constructive algorithms


Solutions:
def f(n, m, k):
	if m == 1:
		if k == 0:
			return True
		else:
			return False
	total = n * m / 2
	maxh = n * (m // 2)
	maxv = n // 2 * m
	minh = total - maxv
	if k == minh or k == maxh:
		return True
	if k < minh or k > maxh:
		return False
	if m == 2:
		if n % 2 == 1 and k % 2 == 0:
			return False
		if n % 2 == 0 and k % 2 == 1:
			return False
	elif m != 2 and (k - minh) % 2 == 1:
		return False
	return True
tc = int(input())
for i in range(tc):
	(n, m, k) = list(map(int, input().strip().split()))
	if f(n, m, k):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(n, m, k) = map(int, input().split())
	x = n * m // 2
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 != 0:
		if k >= m // 2 and (k - m // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif m % 2 != 0:
		k = n * m // 2 - k
		if k >= n // 2 and (k - n // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for test in range(t):
	array = list(map(int, input().rstrip().split()))
	n = array[0]
	m = array[1]
	k = array[2]
	if n % 2 == 0 and m % 2 == 0:
		print('YES' if k % 2 == 0 else 'NO')
	elif n % 2 == 0:
		d = n * (m - 1) // 2
		if k > d:
			print('NO')
		elif k % 2 == 0:
			print('YES')
		else:
			print('NO')
	else:
		row = m // 2
		if k < row:
			print('NO')
		else:
			remain = k - row
			print('YES' if remain % 2 == 0 else 'NO')


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

def solve():
	(n, m, k) = [int(x) for x in input().split()]
	vert_k = n * m // 2 - k
	arr = [[0 for i in range(m)] for j in range(n)]
	(j1, j2) = [0, 1]
	if n % 2 == 1:
		for j in range(0, m, 2):
			if k > 0 and j + 1 < m:
				arr[0][j] = arr[0][j + 1] = 'h'
				k -= 1
	while j2 < m and k > 0:
		for i in range(n):
			if arr[i][j1] == 'h':
				continue
			if k == 0:
				break
			elif k == 1:
				if (n - i - 1) % 2 == 0:
					arr[i][j1] = arr[i][j2] = 'h'
					k -= 1
				else:
					break
			else:
				arr[i][j1] = arr[i][j2] = 'h'
				k -= 1
		j1 = j2 + 1
		j2 = j1 + 1
	k = vert_k
	(i1, i2) = [0, 1]
	while i2 < n and k > 0:
		for j in range(m):
			if k == 0:
				break
			if arr[i1][j] == 0 and arr[i2][j] == 0:
				arr[i1][j] = arr[i2][j] = 'v'
				k -= 1
		i1 = i2
		i2 = i1 + 1
	ct = 0
	for x in arr:
		ct += x.count(0)
	if ct == 0:
		print('YES')
	else:
		print('NO')

def main():
	for case in range(int(input())):
		solve()
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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 _ in range(t):
	(n, m, k) = map(int, input().strip().split())
	if k % 2 == 0:
		if n % 2 == 0:
			if (n * m - n) / 2 < k and m & 1:
				print('NO')
			else:
				print('YES')
		elif k >= m / 2 and (k - m // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 0:
		print('NO')
	elif k >= m / 2 and (k - m // 2) % 2 == 0:
		print('YES')
	else:
		print('NO')


t = int(input())
L = []
a = 0
while a < t:
	l = list(input().split(' '))
	l = list(map(int, l))
	L = L + [l]
	a = a + 1
for l in L:
	(n, m, k) = l
	if m % 2 != 0:
		m = m - 1
	if k * 2 > n * m:
		print('NO')
	elif n % 2 != 0:
		if k < m / 2:
			print('NO')
		else:
			k = k - m / 2
			if k % 2 == 0:
				print('YES')
			else:
				print('NO')
	elif k % 2 == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(h, w, k) = map(int, input().split())
	if w % 2:
		(h, w) = (w, h)
		k = h * w // 2 - k
	k -= h % 2 * w // 2
	print('NO' if k % 2 or k < 0 else 'YES')


from collections import *
from math import *
TT = int(input())
for y in range(TT):
	(n, m, k) = map(int, input().split())
	ans = 'NO'
	if n == 1 or m == 1:
		if n == 1:
			if k == m // 2:
				ans = 'YES'
		elif k == 0:
			ans = 'YES'
	elif n % 2 == 0:
		if m % 2 == 0:
			if k % 2 == 0:
				ans = 'YES'
		elif k % 2 == 0 and k <= n * (m - 1) // 2:
			ans = 'YES'
	elif m % 2 == 0:
		if k >= m // 2 and (k - m // 2) % 2 == 0:
			ans = 'YES'
	else:
		pass
	print(ans)


def dominoes(m, n, k):
	fillcols = int(k / m) * 2
	leftcols = n - fillcols
	leftdoms = k % m
	if k * 2 > m * n:
		print('NO')
	elif leftdoms == 0:
		if m % 2 == 0:
			print('YES')
		elif m * n == k * 2:
			print('YES')
		elif leftcols % 2 == 0:
			stacks = int(leftcols / 2)
			if stacks % 2 == 0:
				fillstacks = int(fillcols / 2)
				extradoms = fillstacks * (m - 1)
				if extradoms >= stacks:
					print('YES')
				else:
					print('NO')
			else:
				print('NO')
		else:
			print('NO')
	elif leftdoms % 2 == 0:
		if m % 2 == 0:
			if leftcols >= 2:
				print('YES')
			else:
				print('NO')
		else:
			spread = leftdoms - 1
			if leftcols % 2 == 0 and leftcols > 2:
				stacks = int((leftcols - 2) / 2)
				if stacks % 2 != 0:
					if spread >= stacks:
						print('YES')
					else:
						fillstacks = int(fillcols / 2)
						extradoms = fillstacks * (m - 1)
						if extradoms >= stacks - spread:
							print('YES')
						else:
							print('NO')
				else:
					print('NO')
			else:
				print('NO')
	elif m % 2 == 0:
		print('NO')
	else:
		spread = leftdoms - 1
		if leftcols % 2 == 0 and leftcols > 2:
			stacks = int((leftcols - 2) / 2)
			if stacks % 2 == 0:
				if spread >= stacks:
					print('YES')
				elif (stacks - spread) % 2 == 0:
					fillstacks = int(fillcols / 2)
					extradoms = fillstacks * (m - 1)
					if extradoms >= stacks - spread:
						print('YES')
					else:
						print('NO')
				else:
					print('NO')
			else:
				print('NO')
		elif leftcols == 2:
			print('YES')
		else:
			print('NO')
x = int(input())
for i in range(x):
	(m, n, k) = map(int, input().split())
	dominoes(m, n, k)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	h = k
	v = n * m // 2 - k
	if m % 2 == 0:
		four = m // 2 * (n // 2)
		if v % 2 == 0 and v // 2 <= four:
			print('YES')
		else:
			print('NO')
	else:
		four = m // 2 * (n // 2)
		if h % 2 == 0 and h // 2 <= four:
			print('YES')
		else:
			print('NO')


import heapq
import os
import sys
from collections import deque
import io
TC = int(input())
for tc in range(TC):
	(N, M, K) = map(int, input().split())
	result = [['?' for _ in range(M)] for _ in range(N)]
	if N % 2 == 1:
		if K < M // 2:
			print('NO')
			continue
		else:
			K -= M // 2
			N -= 1
			for i in range(0, M, 2):
				if i % 4 == 0:
					result[N][i:i + 2] = 'aa'
				else:
					result[N][i:i + 2] = 'bb'
	if N == 0:
		print('YES')
		continue
	rev = False
	while K >= N:
		K -= N
		M -= 2
		for i in range(N):
			if i % 2 == 0 and (not rev) or (i % 2 != 0 and rev):
				result[i][M:M + 2] = 'cc'
			else:
				result[i][M:M + 2] = 'dd'
		rev = not rev
	if K > 0 and M < 2:
		print('NO')
		continue
	if K % 2 == 0:
		if K > 0:
			for i in range(K):
				if i % 2 == 0:
					result[i][M - 2:M] = 'ee'
				else:
					result[i][M - 2:M] = 'ff'
			for i in range(K, N, 2):
				if i % 4 == 0:
					result[i][M - 2:M] = 'gh'
					result[i + 1][M - 2:M] = 'gh'
				else:
					result[i][M - 2:M] = 'hg'
					result[i + 1][M - 2:M] = 'hg'
		elif M > 1:
			for i in range(K, N, 2):
				if i % 4 == 0:
					result[i][M - 2:M] = 'gh'
					result[i + 1][M - 2:M] = 'gh'
				else:
					result[i][M - 2:M] = 'hg'
					result[i + 1][M - 2:M] = 'hg'
		elif M > 0:
			for i in range(K, N, 2):
				if i % 4 == 0:
					result[i][M - 1] = 'h'
					result[i + 1][M - 1] = 'h'
				else:
					result[i][M - 1] = 'g'
					result[i + 1][M - 1] = 'g'
		for i in range(M - 2):
			for j in range(0, N, 2):
				if j % 4 == 0 and i % 2 != 0 or (j % 4 != 0 and i % 2 == 0):
					result[j][i] = 'x'
					result[j + 1][i] = 'x'
				else:
					result[j][i] = 'y'
					result[j + 1][i] = 'y'
		print('YES')
		continue
	else:
		print('NO')
		continue


import sys
input = sys.stdin.readline

def solve():
	(n, m, k) = map(int, input().split())
	if n % 2 == 0:
		print(['NO', 'YES'][k % 2 == 0 and k <= n * (m - m % 2) // 2])
	else:
		k = n * m // 2 - k
		print(['NO', 'YES'][k % 2 == 0 and k <= m * (n - n % 2) // 2])
for i in range(int(input())):
	solve()


for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	(hr, vr) = (k, m * n // 2 - k)
	four = n // 2 * (m // 2)
	ans = 'YES'
	if m % 2 == 0:
		if n % 2 != 0:
			hr -= m // 2
	elif n % 2 == 0:
		vr -= n // 2
	if vr >= 0 and hr >= 0:
		if hr % 2 != 0:
			ans = 'NO'
	else:
		ans = 'NO'
	print(ans)


from collections import defaultdict, Counter, deque
from math import sqrt, log10, log, floor, factorial
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations
import sys, io, os
input = sys.stdin.readline
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
inf = float('inf')
mod = 10 ** 9 + 7

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

def yn(a):
	print('YES' if a else 'NO')
ceil = lambda a, b: (a + b - 1) // b
t = int(input())

def conditions():
	if n * (m // 2) < k:
		return 0
	if k % 2 == 1 and n % 2 == 0:
		return 0
	if n % 2 == 1:
		if m % 2 != 0:
			return 0
		tiles = m // 2
		if k < tiles:
			return 0
		left = k - tiles
		if left % 2 != 0:
			return 0
	return 1
for i in range(t):
	(n, m, k) = get_list()
	res = conditions()
	yn(res)


import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	(n, m, k) = [int(i) for i in input().split()]
	if n == 1:
		if k < m // 2:
			print('NO')
		else:
			print('YES')
	elif m == 1:
		if k:
			print('NO')
		else:
			print('YES')
	elif n % 2 == 0 and m % 2 == 0:
		if k % 2 == 1:
			print('NO')
		else:
			print('YES')
	elif n % 2 == 0 and m % 2:
		k1 = n * m // 2 - k
		if k1 < n // 2:
			print('NO')
		else:
			k1 -= n // 2
			if k1 % 2 == 1:
				print('NO')
			else:
				print('YES')
	elif k < m // 2:
		print('NO')
	else:
		k -= m // 2
		if k % 2 == 1:
			print('NO')
		else:
			print('YES')


import sys
LI = lambda : list(map(int, sys.stdin.readline().split()))
MI = lambda : map(int, sys.stdin.readline().split())
SI = lambda : sys.stdin.readline().strip('\n')
II = lambda : int(sys.stdin.readline())
for _ in range(II()):
	(n, m, k) = MI()
	ok = 0
	if n % 2:
		if k >= m // 2:
			k -= m // 2
			if k % 2 == 0:
				ok = 1
	elif m % 2:
		m -= 1
		if n * m // 2 >= k and k % 2 == 0:
			ok = 1
	elif k % 2 == 0:
		ok = 1
	print(['no', 'yes'][ok])


t = int(input())
for i in range(t):
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	if n % 2 == 0 and m % 2 == 1:
		if k % 2 == 0 and k <= (m - 1) * n // 2:
			print('YES')
		else:
			print('NO')
	if n % 2 == 1 and m % 2 == 0:
		if (m * n // 2 - k) % 2 == 0 and k >= m // 2:
			print('YES')
		else:
			print('NO')


t = int(input())
for task in range(t):
	(n, m, g) = list(map(int, input().split()))
	res = 'Yes'
	v = n * m // 2 - g
	if n % 2 == 1:
		if 2 * g >= m:
			n -= 1
			g -= m // 2
		else:
			res = 'No'
	if m % 2 == 1:
		if 2 * v >= n:
			m -= 1
			v -= n // 2
		else:
			res = 'No'
	if n % 2 == 0 and m % 2 == 0:
		if g % 2 != 0 or v % 2 != 0:
			res = 'No'
	print(res)


for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0 and (k % 2 == 0):
		print('YES')
		continue
	if n % 2 == 0 and m % 2 == 0 and (k % 2 == 1):
		print('NO')
		continue
	if n % 2 == 1 and m % 2 == 0:
		k = (n * m - 2 * k) // 2
		(n, m) = (m, n)
	if n % 2 == 0 and m % 2 == 1:
		if k % 2 == 0 and (m - 1) * n // 2 >= k:
			print('YES')
		else:
			print('NO')


import sys
import math
import bisect
t = int(input())
for a0 in range(t):
	l = [int(i) for i in input().split()]
	n = l[0]
	m = l[1]
	k = l[2]
	f = 0
	if m == 1 and k > 0:
		f = 1
	elif n == 1 and k != m // 2:
		f = 1
	elif m % 2 == 1:
		k1 = n * m // 2 - k
		if k1 < n // 2:
			f = 1
		else:
			k1 -= n // 2
			if k1 % 2 == 1:
				f = 1
	elif n % 2 == 1:
		if k < m // 2:
			f = 1
		else:
			k -= m // 2
			if k % 2 == 1:
				f = 1
	elif k % 2 != 0:
		f = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


from itertools import product, combinations
from math import sqrt
t = int(input())
for _ in range(t):
	(n, m, k) = map(int, input().split())
	v = n * m // 2 - k
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 0:
		if k % 2 == 0 and 2 * k <= n * (m - 1):
			print('YES')
		else:
			print('NO')
	elif v % 2 == 0 and 2 * v <= m * (n - 1):
		print('YES')
	else:
		print('NO')


import sys, os
from math import *
from bisect import *
from heapq import *
from collections import *
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
from io import BytesIO, IOBase

def main():
	for _ in range(int(input())):
		(n, m, k) = MI()
		p = m // 2
		if k == 0:
			if n % 2:
				print('NO')
			else:
				print('YES')
			continue
		ans = False
		if m % 2:
			if k % 2 == 0 and p * n >= k:
				ans = True
		elif n % 2:
			k -= p
			if k >= 0 and k % 2 == 0:
				ans = True
		elif k % 2 == 0:
			ans = True
		if ans:
			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')

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

def outP(var):
	sys.stdout.write(str(var) + '\n')
MOD = 10 ** 9 + 7
mod = 998244353
main()


for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	tot = n * m // 2
	v = n // 2 * m
	if k < tot - v or k > m // 2 * n:
		print('NO')
		continue
	diff = k - (tot - v)
	if diff % 2 == 0:
		print('YES')
	else:
		print('NO')


import sys

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	(h, w, k) = map(int, input().split())
	if w % 2:
		(h, w) = (w, h)
		k = h * w // 2 - k
	k -= h % 2 * w // 2
	print('NO' if k % 2 or k < 0 else 'YES')


t = int(input())

def solve():
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			return 'YES'
		return 'NO'
	elif n % 2 == 0 and m % 2 == 1:
		if k % 2 == 0 and k <= n * m // 2 - n // 2:
			return 'YES'
		return 'NO'
	else:
		if k < m // 2:
			return 'NO'
		k = k - m // 2
		if k % 2 == 0:
			return 'YES'
		return 'NO'
while t:
	t -= 1
	ans = solve()
	print(ans)


for _ in range(int(input())):
	v = [int(x) for x in input().split(' ')]
	if v[0] == 1:
		if v[2] == v[1] / 2:
			print('YES')
		else:
			print('NO')
	elif v[1] == 1:
		if v[2] == 0:
			print('YES')
		else:
			print('NO')
	elif v[0] % 2 == 0 and v[2] % 2 == 0:
		if v[1] % 2 == 0:
			print('YES')
		elif v[1] % 2 == 1 and v[2] <= v[0] * (v[1] - 1) // 2:
			print('YES')
		else:
			print('NO')
	elif v[0] % 2 == 1:
		if v[2] >= v[1] // 2:
			if v[1] % 4 == 0 and v[2] % 2 == 0:
				print('YES')
			elif v[1] % 4 == 2 and v[2] % 2 == 1:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('NO')


(y, z) = ('yes', 'no')

def solve(n, m, k):
	if n % 2 == 1 and m % 2 == 1:
		return z
	if n % 2 == 1:
		if k < m // 2:
			return z
		if (k - m // 2) % 2 == 0:
			return y
		return z
	if m % 2 == 1:
		if n * m // 2 - k < n // 2:
			return z
		if k % 2 == 0 and n * m // 2 - k >= n // 2:
			return y
		return z
	if m % 2 == 0 and n % 2 == 0:
		return [y, z][k % 2]
t = int(input())
for _ in range(t):
	print(solve(*map(int, input().split())))


tt = int(input())
for _ in range(tt):
	(n, m, k) = map(int, input().split())
	minh = m // 2 if n % 2 else 0
	minv = n // 2 if m % 2 else 0
	if k >= minh and (k - minh) % 2 == 0 and (k - minh <= n * m // 2 - minv):
		print('YES')
	else:
		print('NO')


import sys
import math
import collections
dy = [1, 0, -1, 0]
dx = [0, 1, 0, -1]
r = sys.stdin.readline
for _ in range(int(r())):
	(N, M, K) = map(int, r().split())
	if N % 2 == 1:
		if K >= M // 2:
			K -= M // 2
			if K % 2 == 1:
				print('NO')
			else:
				print('YES')
		else:
			print('NO')
	elif M % 2 == 1:
		a = N * M // 2 - K
		if a >= N // 2:
			a -= N // 2
			if a % 2 == 1:
				print('NO')
			else:
				print('YES')
		else:
			print('NO')
	elif K % 2 == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(r, c, k) = [int(i) for i in input().split()]
	if r % 2 == 1:
		if k < c // 2:
			print('NO')
		elif k == c // 2:
			print('YES')
		elif k % 2 == 1:
			if c % 4 == 0:
				print('NO')
			else:
				print('YES')
		elif c % 4 == 2:
			print('NO')
		else:
			print('YES')
	elif c % 2 == 1:
		if r * (c - 1) >= 2 * k:
			if k % 2 == 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	elif k % 2 == 0:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, m, k) = map(int, input().split())
	yoko = k
	tate = n * m // 2 - k
	if n % 2 == 1:
		if yoko < m // 2:
			print('No')
			continue
		else:
			yoko -= m // 2
			n -= 1
	if m % 2 == 1:
		if tate < n // 2:
			print('No')
			continue
		else:
			tate -= n // 2
			m -= 1
	if tate % 2 == 1 or yoko % 2 == 1:
		print('No')
		continue
	print('Yes')


t = int(input())
for l in range(t):
	(n, m, k) = [int(i) for i in input().split()]
	flag = 1
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			flag = 0
			print('YES')
	elif n % 2 == 1 and m % 2 == 0:
		if k - m // 2 >= 0:
			if (k - m // 2) % 2 == 0:
				flag = 0
				print('YES')
	elif n % 2 == 0 and m % 2 == 1:
		if k == 0:
			flag = 0
			print('YES')
		elif k % 2 == 0 and m > 1 and (k <= n * (m - 1) / 2):
			flag = 0
			print('YES')
	if flag:
		print('NO')


for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	check = False
	if n % 2 == 1:
		k -= m // 2
		if k % 2 == 0 and k >= 0:
			check = True
	elif m % 2 == 1:
		if k % 2 == 0 and k <= n * m // 2 - n // 2:
			check = True
	elif k % 2 == 0:
		check = True
	if check:
		print('YES')
	else:
		print('NO')


t = int(input())

def get_input(line):
	return tuple((int(num) for num in line.strip().split()))

def can_fill(rows, cols, k):
	if k == 0:
		return rows % 2 == 0
	elif k >= 1 and cols == 1:
		return False
	elif rows == 1 and 2 * k != cols:
		return False
	if rows % 2 == 0 and cols % 2 == 0:
		return k % 2 == 0
	if rows % 2 == 0 and cols % 2 == 1:
		if k % 2 == 0:
			if 2 * k > rows * (cols - 1):
				return False
			return True
		if k % 2 == 1:
			return False
	if rows % 2 == 1 and cols % 2 == 0:
		return k >= cols / 2 and (k - cols / 2) % 2 == 0
for i in range(t):
	(n, m, k) = get_input(input())
	print('YES' if can_fill(n, m, k) else 'NO')


z = int(input())
while z > 0:
	l = [int(i) for i in input().split(' ')]
	n = l[0]
	m = l[1]
	k = l[2]
	if n % 2 == 0 and m % 2 == 0 and (k % 2 == 0):
		print('YES')
	elif n % 2 == 0 and m % 2 == 0 and (k % 2 == 1) or (n % 2 == 0 and m % 2 == 1 and (k % 2 == 1)):
		print('NO')
	elif n % 2 == 0 and m % 2 == 1 and (k % 2 == 0):
		if k <= n * (m - 1) // 2:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 1 and m % 2 == 0 and (k % 2 == 0):
		if m // 2 % 2 == 0:
			if k >= m // 2:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	elif n % 2 == 1 and m % 2 == 0 and (k % 2 == 1):
		if m // 2 % 2 == 1:
			if k >= m // 2:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('NO')
	z = z - 1


def f(n, m, k):
	if n * m < 2 * k:
		return 'NO'
	if n % 2 == 0 and m % 2 == 0:
		return 'YES' if k % 2 == 0 else 'NO'
	elif n % 2 == 0:
		return f(n, m - 1, k)
	else:
		return f(m, n, n * m // 2 - k)
t = int(input())
for test in range(t):
	(n, m, k) = map(int, input().split())
	print(f(n, m, k))


from __future__ import print_function
import math
from collections import deque
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')
mod = 10 ** 9 + 7

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

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

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

def invr():
	return map(int, input().split())
for _ in range(inp()):
	(n, m, k) = invr()
	if n % 2 == 0:
		r = 0
		while True:
			if n < k:
				k = k - n
				r += 2
			else:
				break
		if k == 0:
			print('YES')
			continue
		else:
			if m - r < 2:
				print('NO')
				continue
			if k % 2 == 0:
				print('YES')
				continue
			else:
				print('NO')
				continue
	else:
		k = n * m // 2 - k
		(n, m) = (m, n)
		r = 0
		while True:
			if n < k:
				k = k - n
				r += 2
			else:
				break
		if k == 0:
			print('YES')
			continue
		else:
			if m - r < 2:
				print('NO')
				continue
			if k % 2 == 0:
				print('YES')
				continue
			else:
				print('NO')
				continue


for i in range(int(input())):
	(n, m, k1) = map(int, input().split())
	k2 = n * m // 2 - k1
	kol = n // 2 * (m // 2)
	kol1 = m * (n % 2) // 2
	kol2 = n * (m % 2) // 2
	if kol1 <= k1 <= kol1 + 2 * kol and kol2 <= k2 <= kol2 + 2 * kol:
		if (k1 - kol1 == 0 or (k1 - kol1) % 2 == 0) and (k2 - kol2 == 0 or (k2 - kol2) % 2 == 0):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import sys
import math
import random
from queue import PriorityQueue as PQ
from bisect import bisect_left as BSL
from bisect import bisect_right as BSR
from collections import OrderedDict as OD
from collections import Counter
from itertools import permutations
mod = 1000000007
sys.setrecursionlimit(1000000)
try:
	sys.stdin = open('actext.txt', 'r')
	OPENFILE = 1
except:
	pass

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

def palindrome(s):
	mid = len(s) // 2
	for i in range(mid):
		if s[i] != s[len(s) - i - 1]:
			return False
	return True

def check(i, n):
	if 0 <= i < n:
		return True
	else:
		return False
t = int(input())
for tt in range(t):
	(n, m, k) = get_ints()
	if n % 2 != 0 and m % 2 != 0:
		print('NO')
	elif n % 2 == 0 and m % 2 == 0:
		mi = 0
		mx = n * m // 2
		if mi <= k <= mx and k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 0:
		mi = 0
		mx = n * (m // 2)
		if mi <= k <= mx and k % 2 == 0:
			print('YES')
		else:
			print('NO')
	else:
		mi = m // 2
		mx = n * m // 2
		if mi <= k <= mx:
			k = k - mi
			if k % 2 == 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	(n, m, k) = [int(x) for x in input().split()]
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
		continue
	if n % 2 and m % 2 == 0:
		v = 0
		(n, m) = (m, n)
		k = m * n // 2 - k
	if True:
		if k % 2 == 0 and k <= m * n // 2 - n // 2:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	b = m // 2 * n
	a = n * m // 2 - n // 2 * m
	if a <= k <= b:
		if k % 2:
			if n % 2:
				print('YES' if m // 2 % 2 else 'NO')
			else:
				print('NO')
		elif n % 2:
			k -= m // 2
			print('YES' if k % 2 == 0 else 'NO')
		else:
			print('YES')
	else:
		print('NO')


from collections import Counter, defaultdict
for _ in range(int(input())):
	(n, m, k) = list(map(int, input().split()))
	if n * m < 2 * k:
		print('NO')
		continue
	if n % 2:
		k -= m // 2
		n -= 1
	elif m % 2:
		m -= 1
	if k < 0 or n * m < 2 * k or k % 2:
		print('NO')
	else:
		print('YES')


n_testcase = int(input())
for testcase in range(n_testcase):
	(size_y, size_x, n_horizontal) = (int(x) for x in input().split())
	n_vertical = size_y * size_x // 2 - n_horizontal
	if size_x % 2 == 0 and size_y % 2 == 0:
		print('YES' if n_horizontal % 2 == 0 else 'NO')
	if size_x % 2 == 0 and size_y % 2 == 1:
		required_n_horizontal = size_x // 2
		if n_horizontal < required_n_horizontal:
			print('NO')
		else:
			n_horizontal -= required_n_horizontal
			print('YES' if n_horizontal % 2 == 0 else 'NO')
	if size_x % 2 == 1 and size_y % 2 == 0:
		required_n_vertical = size_y // 2
		if n_vertical < required_n_vertical:
			print('NO')
		else:
			n_vertical -= required_n_vertical
			print('YES' if n_horizontal % 2 == 0 else 'NO')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	if n == 1:
		if m % 2 == 1:
			sys.stdout.write('NO\n')
		else:
			val = m // 2
			if val == k:
				sys.stdout.write('YES\n')
			else:
				sys.stdout.write('NO\n')
		continue
	if m == 1:
		if n % 2 == 1 or k > 0:
			sys.stdout.write('NO\n')
		else:
			sys.stdout.write('YES\n')
		continue
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			sys.stdout.write('YES\n')
		else:
			sys.stdout.write('NO\n')
		continue
	if n % 2 == 0 and m % 2 == 1:
		if n * m - n < k * 2:
			sys.stdout.write('NO\n')
		elif k % 2 == 0:
			sys.stdout.write('YES\n')
		else:
			sys.stdout.write('NO\n')
		continue
	if n % 2 == 1 and m % 2 == 0:
		if k * 2 < m:
			sys.stdout.write('NO\n')
		elif n * m - m < k * 2 - m:
			sys.stdout.write('NO\n')
		else:
			val = (k * 2 - m) // 2
			if val % 2 == 1:
				sys.stdout.write('NO\n')
			else:
				sys.stdout.write('YES\n')
		continue
	sys.stdout.write('NO\n')


n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a % 2:
		cnt = b // 2
		c -= cnt
		if c < 0:
			print('NO')
		elif c % 2:
			print('NO')
		else:
			print('YES')
	elif b % 2:
		if c % 2:
			print('NO')
		elif 2 * c > a * b - a:
			print('NO')
		else:
			print('YES')
	elif c % 2:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 1:
			print('NO')
		else:
			print('YES')
	else:
		if m % 2 == 1:
			a = n
			n = m
			m = a
			k = m * n // 2 - k
		if (k - m // 2) % m == 0 or (k > m // 2 and (k - m // 2) % 2 == 0):
			print('YES')
		else:
			print('NO')


for nt in range(int(input())):
	(n, m, k) = map(int, input().split())
	v = n * m // 2 - k
	if m % 2:
		v -= n // 2
	elif n % 2:
		k -= m // 2
	if k % 2 == 0 and v % 2 == 0 and (v >= 0) and (k >= 0):
		print('YES')
	else:
		print('NO')


from itertools import product
import itertools
import math
import sys
import heapq
from collections import deque
MOD = 1000000000007

def find(parent, i):
	if parent[i] != i:
		parent[i] = find(parent, parent[i])
	return parent[i]

def union(parent, rank, xx, yy):
	x = find(parent, xx)
	y = find(parent, yy)
	if rank[x] > rank[y]:
		parent[y] = x
	elif rank[y] > rank[x]:
		parent[x] = y
	else:
		parent[y] = x
		rank[x] += 1
ans = 0
K = int(sys.stdin.readline().strip())
x = 0
y = 0
for _ in range(K):
	(n, m, k) = list(map(int, sys.stdin.readline().strip().split()))
	if n % 2 == 0 and m % 2 == 0:
		if k % 2:
			print('NO')
		else:
			print('YES')
	elif m % 2:
		if k % 2 == 0 and k * 2 <= (m - 1) * n:
			print('YES')
		else:
			print('NO')
	elif k >= m // 2 and (k - m // 2) % 2 == 0 and ((k - m // 2) * 2 <= (n - 1) * m):
		print('YES')
	else:
		print('NO')


t = int(input())

def solve():
	(n, m, k) = map(int, input().split())
	if n % 2 == 0:
		if k % 2 == 1:
			print('NO')
			return
		if m % 2 == 0:
			print('YES')
			return
		if k > (m - 1) * n / 2:
			print('NO')
		else:
			print('YES')
		return
	l = m // 2
	if k < l:
		print('NO')
		return
	if (k - l) % 2 == 0:
		print('YES')
	else:
		print('NO')
for _ in range(t):
	solve()


from collections import defaultdict
tc = int(input())
for _ in range(tc):
	(n, m, k) = list(map(int, input().split()))
	c = 0
	(h, v) = (k, n * m // 2 - k)
	if m % 2 == 1:
		m -= 1
		if m == 0:
			if k == 0:
				print('YES')
			else:
				print('NO')
		elif n * m // 2 < k:
			print('NO')
		elif k % 2 > 0:
			print('NO')
		else:
			print('YES')
	elif n % 2 == 1:
		if k < m // 2:
			print('NO')
		elif (k - m // 2) % 2 > 0:
			print('NO')
		else:
			print('YES')
	elif k % 2 == 0:
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	(r, c, k) = [int(i) for i in input().split()]
	b = r * c // 2
	if c == 1 and k > 0:
		print('NO')
	elif r == 1 and k < b:
		print('NO')
	elif c % 2 == 1:
		if k % 2 == 0 and k <= b - r // 2:
			print('YES')
		else:
			print('NO')
	elif r % 2 == 1:
		flag1 = k // (c // 2)
		flag2 = k % (c // 2)
		if flag1 == 0:
			print('NO')
			continue
		if k == 0:
			print('NO')
			continue
		if flag1 % 2 == 0:
			flag1 -= 1
			flag2 += c // 2
		r -= flag1
		if r == 0 or flag2 % r % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif r % 2 == 0 and c % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')


N = 104

def printResult():
	for j in range(n):
		x = 0
		for i in range(m):
			if a[i][j] != 0:
				x += 1
			else:
				if x % 2 == 1:
					print('NO')
					return
				break
	print('YES')
test = int(input())
for _ in range(test):
	(m, n, k) = map(int, input().split())
	if m % 2 == 1:
		tmp = m
		m = n
		n = tmp
		k = m * n // 2 - k
	a = [[0 for k in range(N)] for k in range(N)]
	for i in range(0, m, 2):
		if n > 1:
			for j in range(0, n - 1, 2):
				if k == 0:
					break
				a[i][j] = a[i][j + 1] = k
				k -= 1
				if k == 0:
					break
				a[i + 1][j] = a[i + 1][j + 1] = k
				k -= 1
				if k == 0:
					break
		if k == 0:
			break
	if k > 0:
		print('NO')
	else:
		printResult()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	if not n % 2:
		if not k % 2:
			if k > m // 2 * n:
				print('NO')
			else:
				print('YES')
		else:
			print('NO')
	elif k < m // 2:
		print('NO')
	else:
		k -= m // 2
		if not k % 2:
			if k > m // 2 * n:
				print('NO')
			else:
				print('YES')
		else:
			print('NO')


def solve():
	(n, m, k) = map(int, input().split())
	if k > n * m // 2:
		print('NO')
		return
	if n % 2 == 1 and m % 2 == 0:
		if k < m // 2:
			print('NO')
			return
		elif k == m // 2:
			print('YES')
			return
		elif k > m // 2:
			if (k - m // 2) % 2 == 0:
				print('YES')
				return
			else:
				print('NO')
				return
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	if n % 2 == 0 and m % 2 == 1:
		if k % 2 == 1:
			print('NO')
		elif k > (m * n - n) // 2:
			print('NO')
		else:
			print('YES')
for i in range(int(input())):
	solve()


fin = 0

def YESNO(flg):
	global fin
	print('YES' if flg else 'NO')
	if not flg:
		fin = 1

def solve(N, M, A, B):

	def fillhor(i, j):
		global answer
		assert 0 <= i < N and 0 <= j < M - 1
		answer[i][j] = '<'
		answer[i][j + 1] = '>'

	def fillver(i, j):
		global answer
		assert 0 <= i < N - 1 and 0 <= j < M
		answer[i][j] = '^'
		answer[i + 1][j] = 'v'
	if N % 2 == M % 2 == 0:
		square_num = (A + 1) // 2 + (B + 1) // 2
		if N * M // 4 < square_num:
			YESNO(False)
		else:
			YESNO(True)
			for i in range(0, N, 2):
				for j in range(0, M, 2):
					if A:
						fillhor(i, j)
						A -= 1
						if A:
							fillhor(i + 1, j)
							A -= 1
					elif B:
						fillver(i, j)
						B -= 1
						if B:
							fillver(i, j + 1)
							B -= 1
	elif N % 2 == 0 and M % 2 == 1:
		j = M - 1
		for i in range(0, N, 2):
			if B:
				fillver(i, j)
				B -= 1
		solve(N, M - 1, A, B)
	elif N % 2 == 1 and M % 2 == 0:
		i = N - 1
		for j in range(0, M, 2):
			if A:
				fillhor(i, j)
				A -= 1
		solve(N - 1, M, A, B)
	elif N == 1 and M == 1:
		YESNO(A == 0 and B == 0)
	elif N == 1 and M != 1:
		YESNO(2 * A <= M and B == 0)
		for i in range(0, M, 2):
			if A:
				fillhor(0, i)
				A -= 1
	elif N != 1 and M == 1:
		YESNO(2 * B <= N and A == 0)
		for i in range(0, N, 2):
			if B:
				fillver(i, 0)
				B -= 1
	else:
		j = M - 1
		for i in range(0, N - 1, 2):
			if B:
				fillver(i, j)
				B -= 1
		if B % 2 == 1:
			fillver(N - 2, M - 3)
			B -= 1
			if A:
				fillhor(N - 3, M - 3)
				A -= 1
			if A:
				fillhor(N - 1, M - 2)
				A -= 1
		else:
			if A:
				fillhor(N - 1, M - 3)
				A -= 1
			if B >= 2:
				fillver(N - 3, M - 3)
				fillver(N - 3, M - 2)
				B -= 2
			else:
				if A:
					fillhor(N - 3, M - 3)
					A -= 1
				if A:
					fillhor(N - 2, M - 3)
					A -= 1
		j = M - 3
		for i in range(0, N - 3, 2):
			if B:
				fillver(i, j)
				B -= 1
				if B:
					fillver(i, j + 1)
					B -= 1
			elif A:
				fillhor(i, j)
				A -= 1
				if A:
					fillhor(i + 1, j)
					A -= 1
		if M > 3:
			solve(N, M - 3, A, B)
		else:
			YESNO(A == 0 and B == 0)
t = int(input())
for _ in range(t):
	(N, M, A) = map(int, input().split())
	B = N * M // 2 - A
	answer = [['.'] * M for _ in range(N)]
	solve(N, M, A, B)


from collections import defaultdict
t = int(input())
for i in range(1, t + 1):
	(m, n, k_h) = list(map(int, input().split()))
	k_v = m * n // 2 - k_h
	if n == 1 and k_h > 0 or (m == 1 and k_v > 0):
		print('NO')
	elif n % 2 == 0:
		if m % 2 == 1:
			k_h -= n // 2
		if k_h < 0 or k_h % 2 == 1:
			print('NO')
		else:
			print('YES')
	else:
		if n % 2 == 1:
			k_v -= m // 2
		if k_v < 0 or k_v % 2 == 1:
			print('NO')
		else:
			print('YES')


mas = list(map(int, input().split()))
t = mas[0]
for j in range(t):
	mas = list(map(int, input().split()))
	n = mas[0]
	m = mas[1]
	k = mas[2]
	if n % 2 == 1:
		kol4 = (n - 1) * m // 4
	elif m % 2 == 1:
		kol4 = n * (m - 1) // 4
	else:
		kol4 = n * m // 4
	if n % 2 == 1:
		kol_gor = (n * m - kol4 * 4) // 2
	else:
		kol_gor = 0
	if m % 2 == 1:
		kol_ver = (n * m - kol4 * 4) // 2
	else:
		kol_ver = 0
	if kol_gor > k:
		print('NO')
	elif n * m // 2 < k + kol_ver:
		print('NO')
	elif (k - kol_gor) % 2 == 1:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n, m, k) = list(map(int, input().split()))
	if n % 2 == 0:
		row_d = m // 2
		tot = n * row_d
		if k > tot:
			print('no')
			continue
		else:
			rem = k % n
			if (n - rem) % 2 == 0:
				print('yes')
			else:
				print('no')
	else:
		col_d = m // 2
		tot = col_d * n
		if k > tot:
			print('no')
			continue
		if k < col_d or (k - col_d) % 2 != 0:
			print('no')
		else:
			print('yes')


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for _ in range(t):
	(n, m, k) = map(int, input().split())
	hor_tiles = m // 2 * (n % 2)
	possible = m // 2 * n >= k >= hor_tiles and k % 2 == hor_tiles % 2
	print('YES' if possible else 'NO')


from time import time
import math
import os
import sys
from math import ceil, floor, sqrt, gcd, factorial
from io import BytesIO, IOBase
from collections import Counter
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 prog_name():
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 != 0 and m % 2 == 0:
		if k >= m // 2:
			k -= m // 2
			if k % 2 == 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		v = n * m // 2 - k
		if v >= n // 2:
			v -= n // 2
			if v % 2 == 0:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')

def main():
	T = int(input())
	for unique in range(T):
		prog_name()
main()


t = int(input())
otv = list()
for i in range(t):
	(n, m, k) = map(int, input().split())
	if m % 2 == 1:
		k = m * n // 2 - k
		k -= m % 2 * n // 2
	else:
		k -= n % 2 * m // 2
	if k % 2 == 1 or k < 0:
		otv.append('NO')
	else:
		otv.append('YES')
for i in otv:
	print(i)


from collections import Counter
import string
import math
import bisect
import sys
from fractions import Fraction

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))
testcases = vary(1)
for _ in range(testcases):
	(n, m, k) = map(int, input().split())
	minh = m // 2 if n % 2 else 0
	minv = n // 2 if m % 2 else 0
	if k >= minh and (k - minh) % 2 == 0 and (k - minh <= n * m // 2 - minv):
		print('YES')
	else:
		print('NO')


import sys
input = iter(sys.stdin.read().splitlines()).__next__

def solve(N, M, K):
	if N % 2 == 0 and M % 2 == 0:
		return K % 2 == 0
	assert N * M % 2 == 0
	if N % 2 == 0:
		(N, M) = (M, N)
		K = N * M // 2 - K
	M2 = M // 2
	if K < M2:
		return False
	return (K - M2) % 2 == 0
TC = int(input())
for tc in range(TC):
	(N, M, K) = map(int, input().split())
	res = solve(N, M, K)
	print('YES' if res else 'NO')


import sys
import getpass
import math, random
import functools, itertools, collections, heapq, bisect
from collections import Counter, defaultdict, deque
input = sys.stdin.readline
M9 = 10 ** 9 + 7
(yes, no) = ('YES', 'NO')
MAXINT = sys.maxsize
OFFLINE_TEST = getpass.getuser() == 'hkmac'

def log(*args):
	if OFFLINE_TEST:
		print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)

def solve(*args):
	if OFFLINE_TEST:
		log('----- solving ------')
		log(*args)
		log('----- ------- ------')
	return solve_(*args)

def read_matrix(rows):
	return [list(map(int, input().split())) for _ in range(rows)]

def read_strings(rows):
	return [input().strip() for _ in range(rows)]

def minus_one(arr):
	return [x - 1 for x in arr]

def minus_one_matrix(mrr):
	return [[x - 1 for x in row] for row in mrr]

def solve_(a, b, c):
	required = 0
	blocked = 0
	if a % 2:
		required = b // 2
	if b % 2:
		blocked = a // 2
	log(required)
	remaining = c - required
	if remaining < 0:
		return no
	if remaining % 2:
		return no
	if remaining > a * b // 2 - blocked:
		return no
	return yes
for case_num in range(int(input())):
	(a, b, c) = list(map(int, input().split()))
	res = solve(a, b, c)
	print(res)


t = int(input())
for i in range(t):
	(n, m, k) = [int(i) for i in input().split()]
	impar = False
	out = ''
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			out = 'YES'
		else:
			out = 'NO'
	elif n % 2 == 1:
		sobra = m / 2
		if k - sobra >= 0 and (k - sobra) % 2 == 0:
			out = 'YES'
		else:
			out = 'NO'
	elif n % 2 == 0 and m % 2 == 1:
		if m // 2 * n >= k and k % 2 == 0:
			out = 'YES'
		else:
			out = 'NO'
	print(out)


def solve(n, m, k):
	(vertical, horizontal) = (m * n // 2 - k, k)
	if n % 2 == 1:
		if horizontal < m // 2:
			return False
		horizontal -= m // 2
		n -= 1
	if m % 2 == 1:
		if vertical < n // 2:
			return False
		vertical -= n // 2
		m -= 1
	return vertical % 2 == 0

def main():
	t = int(input())
	for _ in range(t):
		(n, m, k) = list(map(int, input().split()))
		answ = solve(n, m, k)
		print('yes' if answ else 'no')
main()


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

def main(t):
	(m, n, k) = map(int, input().split())
	if m % 2 == 1:
		if (m * n // 2 - k) % 2 == 0 and k >= n // 2:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 1:
		if k % 2 == 0 and m * n // 2 - k >= m // 2:
			print('YES')
		else:
			print('NO')
	elif k % 2 == 0:
		print('YES')
	else:
		print('NO')
T = int(input())
t = 1
while t <= T:
	main(t)
	t += 1


t = int(input())

def Check(n, m, k):
	horizontal = k
	vertical = n * m // 2 - horizontal
	if n % 2 == 1 and m % 2 == 1:
		return False
	elif n % 2 == 1:
		horizontal -= m // 2
		if horizontal < 0:
			return False
	elif m % 2 == 1:
		vertical -= n // 2
		if vertical < 0:
			return False
	if horizontal % 2 != 0 or vertical % 2 != 0:
		return False
	return True
for i in range(t):
	inp = list(map(int, input().split()))
	n = inp[0]
	m = inp[1]
	k = inp[2]
	if Check(n, m, k):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(n, m, k) = map(int, input().split())
	is_possible = False
	if k == 0:
		is_possible = True if n % 2 == 0 else False
	elif m % 2 == 0 or (m - 1) * n / 2 >= k:
		if n % 2 == 0:
			is_possible = True if k % 2 == 0 else False
		else:
			columns = m / 2
			is_possible = True if k >= columns and (k - columns) % 2 == 0 else False
	print('YES' if is_possible else 'NO')


def check_from_left_top_corner(n, m):
	for i in range(1, 1 + n):
		for j in range(2, m + 1, 2):
			if n - i & 1:
				continue
			if i & 1 and j < m:
				continue
			yield [i, j]

def check(n, m, k):
	for (w1, w2) in check_from_left_top_corner(n, m):
		if w1 * w2 == 2 * k:
			return 'Yes'
		if w1 < n and w2 < m:
			continue
		consumed = w1 * w2 // 2
		new_k = k - consumed
		for (w1, w2) in check_from_left_top_corner(n - w1, m):
			if w1 * w2 == 2 * new_k:
				return 'Yes'
		for (w1, w2) in check_from_left_top_corner(n, m - w2):
			if w1 * w2 == 2 * new_k:
				return 'Yes'
	return 'No'

def solve():
	(n, m, k) = [int(x) for x in input().split()]
	if k == 0:
		if n & 1:
			return 'No'
		return 'Yes'
	if check(n, m, k) == 'Yes':
		return 'Yes'
	return 'No'
for _ in range(int(input())):
	print(solve())


oa = ord('a')

def slv(n, m, k):
	ans = [[-1] * m for i in range(n)]
	if k & 1:
		return None
	if k > m // 2 * n:
		return None
	cnt = 0
	for i in range(0, n, 2):
		for j in range(0, m - 1, 2):
			hh = i // 2 % 2 * 2 + j // 2 % 2
			c1 = 2 * hh
			c2 = 2 * hh + 1
			if cnt == k:
				ans[i][j] = c1
				ans[i + 1][j] = c1
				ans[i][j + 1] = c2
				ans[i + 1][j + 1] = c2
			else:
				ans[i][j] = c1
				ans[i][j + 1] = c1
				ans[i + 1][j] = c2
				ans[i + 1][j + 1] = c2
				cnt += 2
	if m & 1:
		for j in range(0, n, 2):
			c = 8 if j & 1 else 9
			ans[j][m - 1] = c
			ans[j + 1][m - 1] = c
	return ans
for _ in range(int(input())):
	(n, m, k) = [int(i) for i in input().split()]
	ans = []
	if n & 1:
		if k >= m // 2:
			ans = slv(n - 1, m, k - m // 2)
			if ans is None:
				print('NO')
				continue
			lst = [-1] * m
			for i in range(0, m, 2):
				c = 10 if i & 2 else 11
				lst[i] = c
				lst[i + 1] = c
			ans.append(lst)
		else:
			print('NO')
			continue
	else:
		ans = slv(n, m, k)
		if ans is None:
			print('NO')
			continue
	print('YES')


from sys import stdin, stdout
input = stdin.readline
t = int(input())
for _ in range(t):
	(n, m, k) = map(int, input().split())
	if m % 2:
		(n, m) = (m, n)
		k = n * m // 2 - k
	vv = m * (n // 2)
	hh = 0
	if n % 2:
		hh = m // 2
	ans = 'no'
	assert vv % 2 == 0
	while 1:
		if hh == k:
			ans = 'yes'
			break
		if vv == 0:
			break
		hh += 2
		vv -= 2
		if hh == k:
			ans = 'yes'
			break
	print(ans)


import sys
pl = 1
sys.setrecursionlimit(10 ** 5)
if pl:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('outpt.txt', 'w')

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

def fi():
	return int(input())

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

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

def ff():
	sys.stdout.flush()

def google(tc, *ans):
	print('Case #' + str(tc) + ':', *ans)
t = fi()
f = t
while t > 0:
	t -= 1
	(n, m, k) = mi()
	p = n * m // 2
	if n % 2 == 0 and m % 2 == 0:
		print('YES' if k % 2 == 0 else 'NO')
	elif n == 1:
		print('YES' if k == p else 'NO')
	elif m == 1:
		print('YES' if k == 0 else 'NO')
	elif n % 2:
		k -= m // 2
		print('YES' if k % 2 == 0 and k >= 0 else 'NO')
	else:
		k = p - k
		(n, m) = (m, n)
		k -= m // 2
		print('YES' if k % 2 == 0 and k >= 0 else 'NO')


import math as m
t = int(input())
for _ in range(t):
	answer = 0
	(rows, columns, k) = [int(x) for x in input().split(' ')]
	if m.floor(columns / 2) * rows >= k:
		if rows % 2 == 0:
			if k % 2 == 0:
				answer = 1
			else:
				answer = 0
		elif k >= columns / 2:
			solid = m.floor(k / (columns / 2))
			if columns % 4 == 2:
				if k == columns / 2 * rows:
					answer = 1
				elif k % 2 == 0:
					answer = 0
				elif solid % 2 == 0 and solid < rows:
					answer = 1
				elif solid % 2 == 1:
					if k % columns == 0:
						answer = 1
					elif solid < rows - 1:
						answer = 1
					else:
						answer = 0
				else:
					answer = 0
			elif k == columns / 2 * rows:
				answer = 1
			elif k % 2 == 0:
				if solid % 2 == 0 and solid < rows:
					answer = 1
				elif solid % 2 == 1:
					if k % columns == 0:
						answer = 1
					elif solid < rows - 1:
						answer = 1
					else:
						answer = 0
			else:
				answer = 0
		else:
			answer = 0
	else:
		answer = 0
	if answer == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, m, k) = [i for i in map(int, input().split())]
	m1 = m // 2
	if k * 2 / n <= m1 * 2:
		if n % 2 == 0:
			if k % 2 == 0:
				print('Yes')
			else:
				print('NO')
		elif m % 2 == 0:
			if k >= m1:
				k = k - m1
				if k % 2 == 0:
					print('Yes')
				else:
					print('NO')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('NO')


from math import floor, gcd, sqrt, ceil
from collections import Counter, defaultdict
from heapq import heapify, heappop, heappush

def main():
	for _ in range(int(input())):
		(n, m, k) = map(int, input().split())
		chaiye = n * m // 2
		if n % 2 == 0 and m % 2 == 0 and (k % 2 != 1):
			print('YES')
		elif m == 1 and k > 0:
			print('NO')
		elif n == 1 and n * m // 2 - k > 0:
			print('NO')
		elif n == 2 and k % 2 == 1:
			print('NO')
		elif m == 2 and (n * m // 2 - k) % 2 == 1:
			print('NO')
		elif n % 2 == 0 and k % 2 == 1:
			print('NO')
		elif m % 2 == 0 and (n * m // 2 - k) % 2 == 1:
			print('NO')
		elif m % 2 == 1 and k <= n * (m - 1) // 2:
			print('YES')
		elif n % 2 == 1 and n * m // 2 - k <= (n - 1) * m // 2:
			print('YES')
		else:
			print('NO')
main()


def sol():
	(n, m, k) = map(int, input().split())
	k2 = n * m / 2 - k
	if n % 2 == 1:
		k -= m / 2
		if k < 0:
			return 'NO'
	elif m % 2 == 1:
		k2 -= n / 2
		if k2 < 0:
			return 'NO'
	if k % 2 == 1 or k2 % 2 == 1:
		return 'NO'
	return 'YES'
for t in range(int(input())):
	print(sol())


import sys
input = sys.stdin.readline

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

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

def mps(A):
	return [tuple(map(int, input().split())) for _ in range(A)]
import math
import bisect
from copy import deepcopy as dc
from itertools import accumulate
from collections import Counter, defaultdict, deque

def ceil(U, V):
	return (U + V - 1) // V

def modf1(N, MOD):
	return (N - 1) % MOD + 1
inf = int(1e+20)
mod = int(1000000000.0 + 7)
t = int(input())
for _ in range(t):
	(n, m, suihei) = mp()
	grid = [[0] * m for i in range(n)]
	suityoku = (n * m - suihei * 2) // 2
	if n % 2 == 0:
		if suihei % 2 == 0 and suihei * 2 <= n * (m // 2) * 2:
			print('Yes')
		else:
			print('No')
	elif suihei == 0:
		print('No')
	elif m // 2 > suihei:
		print('No')
	else:
		suihei -= m // 2
		n -= 1
		if suihei % 2 == 0 and suihei * 2 <= n * (m // 2) * 2:
			print('Yes')
		else:
			print('No')


t = int(input())
for _ in range(t):
	(n, m, k) = tuple(map(int, input().split()))
	if n % 2 == m % 2 == 1:
		print('No')
	else:
		p = m // 2
		if n % 2 == 1 and k < p:
			print('No')
		else:
			bruh = n % 2
			n -= bruh
			k -= bruh * p
			if k % 2 == 1:
				print('no')
			elif k > p * n:
				print('no')
			else:
				print('yes')


t = int(input())
for i in range(t):
	(n, m, k) = map(int, input().split())
	a = 0
	flag = False
	if m % 2 == 0:
		while 2 * k - a * m > 0:
			if (2 * k - a * m) % 4 == 0:
				if (n - a) % 2 == 0:
					print('YES')
					flag = True
					break
			a += 1
		if not flag:
			if 2 * k - a * m == 0:
				if (n - a) % 2 == 0:
					print('YES')
					flag = True
				else:
					print('NO')
					flag = True
			else:
				print('NO')
	else:
		while n * m - 2 * k - a * n > 0:
			if (n * m - 2 * k - a * n) % 4 == 0:
				if (m - a) % 2 == 0:
					print('YES')
					flag = True
					break
			a += 1
		if not flag:
			if n * m - 2 * k - a * n == 0:
				if (m - a) % 2 == 0:
					print('YES')
					flag = True
				else:
					print('NO')
					flag = True
			else:
				print('NO')


import os, sys
from io import BytesIO, IOBase
from collections import deque, Counter, defaultdict as dft
from heapq import heappop, heappush
from math import log, sqrt, factorial, cos, tan, sin, radians, log2, ceil, floor
from bisect import bisect, bisect_left, bisect_right
from decimal import *
import sys, threading
from itertools import permutations, combinations
from copy import deepcopy
input = sys.stdin.readline
ii = lambda : int(input())
si = lambda : input().rstrip()
mp = lambda : map(int, input().split())
ms = lambda : map(str, input().strip().split(' '))
ml = lambda : list(mp())
mf = lambda : map(float, input().split())
alphs = 'abcdefghijklmnopqrstuvwxyz'

def solve():
	(n, m, k) = mp()
	total = n * m // 2
	rkne = n * m // 2 - k
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 0 and m % 2:
		if k % 2 == 0 and total - n // 2 >= k:
			print('YES')
		else:
			print('NO')
	else:
		k = n * m // 2 - k
		(n, m) = (m, n)
		if k % 2 == 0 and total - n // 2 >= k:
			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')

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')
tc = 1
tc = ii()
for i in range(tc):
	solve()


for input_number in range(int(input())):
	(n, m, k) = map(int, input().split())
	if n % 2 == 1:
		if k - m // 2 >= 0 and (k - m // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif m % 2 == 1:
		if n * m / 2 - k - n // 2 >= 0 and (n * m / 2 - k - n // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif k % 2 == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, m, H) = map(int, input().split())
	V = n * m // 2 - H
	if m % 2 == 1:
		V -= n // 2
	elif n % 2 == 1:
		H -= m // 2
	if H % 2 == 0 and V % 2 == 0 and (H >= 0) and (V >= 0):
		print('YES')
	else:
		print('NO')


import sys
from os import path
input = lambda : sys.stdin.readline().rstrip()
if path.exists('Input.txt'):
	sys.stdin = open('Input.txt', 'r')
	sys.stdout = open('Output.txt', 'w')

def solve_tc():
	(n, m, k) = map(int, input().split())
	if n & 1:
		k -= m // 2
		if not k & 1 and k >= 0:
			return 'YES'
		else:
			return 'NO'
	elif m & 1:
		if not k & 1 and k * 2 <= n * (m - 1):
			return 'YES'
		else:
			return 'NO'
	elif not k & 1:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for _ in range(t):
	sys.stdout.write(str(solve_tc()))
	sys.stdout.write('\n')


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 ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

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):
	(n, m, k) = map(int, input().split())
	if n % 2 == m % 2 == 0:
		if k % 2:
			print('NO')
		else:
			print('YES')
	elif n % 2 == 0:
		if k % 2 or k > n * (m // 2):
			print('NO')
		else:
			print('YES')
	else:
		k2 = n * m // 2 - k
		if k2 % 2 or k2 > m * (n // 2):
			print('NO')
		else:
			print('YES')


import sys
import bisect
from bisect import bisect_left as lb
from bisect import bisect_right as rb
input_ = lambda : sys.stdin.readline().strip('\r\n')
from math import log
from math import gcd
from math import atan2, acos
from random import randint
sa = lambda : input_()
sb = lambda : int(input_())
sc = lambda : input_().split()
sd = lambda : list(map(int, input_().split()))
sflo = lambda : list(map(float, input_().split()))
se = lambda : float(input_())
sf = lambda : list(input_())
flsh = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7
mod1 = 998244353
gp = []
cost = []
dp = []
mx = []
ans1 = []
ans2 = []
special = []
specnode = []
a = 0
kthpar = []

def dfs2(root, par):
	if par != -1:
		dp[root] = dp[par] + 1
	for i in range(1, 20):
		if kthpar[root][i - 1] != -1:
			kthpar[root][i] = kthpar[kthpar[root][i - 1]][i - 1]
	for child in gp[root]:
		if child == par:
			continue
		kthpar[child][0] = root
		dfs(child, root)
ans = 0
b = []
vis = []
tot = 0
time = []
time1 = []
adj = []
mx = -1

def dfs(a, b, p, c):
	if a == b:
		return c
	for (i, j) in adj[a]:
		if i == p:
			continue
		temp = dfs(i, b, a, c + j)
		if dfs(i, b, a):
			mx = max(i, mx)
			return 1
eps = 9e-07

def hnbhai(tc):
	(n, m, k) = sd()
	if n % 2:
		abe = n * m // 2 - k
		if abe % 2:
			print('NO')
			return
		if abe > (n - 1) * m // 2:
			print('NO')
			return
		print('YES')
		return
	if m % 2 == 0:
		if k % 2:
			print('NO')
			return
		print('YES')
		return
	if k % 2:
		print('NO')
		return
	if k > (m - 1) * n // 2:
		print('NO')
		return
	print('YES')

def dfs(root):
	global tot, vis, gp
	for child in gp[root]:
		if vis[child] == 0:
			tot += 1
			vis[child] = 1
			dfs(child)
for _ in range(sb()):
	hnbhai(_ + 1)


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

def si():
	return input()

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

def msi():
	return map(str, input().split())

def li():
	return list(mi())
t = ii()
for _ in range(t):
	(n, m, k) = mi()
	if n == 1:
		if k == m // 2:
			print('YES')
		else:
			print('NO')
	elif m == 1:
		if k == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 0:
		if k % 2 == 0:
			if k <= n * (m // 2):
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	elif m % 2 == 0:
		if k >= m // 2:
			k -= m // 2
			n -= 1
			if k % 2 == 0:
				if k <= n * (m // 2):
					print('YES')
				else:
					print('NO')
			else:
				print('NO')
		else:
			print('NO')
	else:
		print('NO')


def sol():
	(n, m, k) = map(int, input().split())
	if m % 2 == 1:
		if n * m - n < k * 2:
			return 'NO'
	if n % 2 == 1:
		if k < m // 2:
			return 'NO'
		k -= m // 2
	if k % 2 == 1:
		return 'NO'
	return 'YES'
try:
	for _ in range(int(input())):
		print(sol())
except:
	pass


import heapq
import sys
import math
from collections import deque
from bisect import bisect_left, bisect_right
I = sys.stdin.readline
II = lambda : int(I())
IN = lambda x: map(int, x.split())
FN = lambda x: map(float, x.split())
L = lambda x: list(IN(x))
M = 1000000007
P = print
T = True
F = False
for _ in range(II()):
	(n, m, k) = IN(I())
	if n & 1 == 0 and m & 1 == 0:
		if k & 1 == 1:
			print('No')
		else:
			print('yes')
	elif n & 1 == 0:
		ap = (m - 1) * (n // 2)
		if k & 1 == 0 and k <= ap:
			print('yes')
		else:
			print('NO')
	else:
		ap = k - m // 2
		if ap >= 0 and ap & 1 == 0:
			print('YEs')
		else:
			print('NO')


import sys
input = lambda : sys.stdin.readline().rstrip()
T = int(input())

def make_target(coins, target, N):
	dp = [[False] * (target + 1) for _ in range(N + 1)]
	dp[0][0] = True
	for i in range(N):
		for j in range(target + 1):
			for k in range(len(coins)):
				if j >= coins[k]:
					dp[i + 1][j] = dp[i + 1][j] or dp[i][j - coins[k]]
	return dp[N][target]
for _ in range(T):
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	else:
		if m % 2 == 0:
			(n, m) = (m, n)
		else:
			k = n * m // 2 - k
		keys = [v for v in range(1, m + 1, 2)]
		total = 0
		if make_target(keys, k, n // 2):
			print('YES')
		else:
			print('NO')


a = int(input())
for _ in range(a):
	(n, m, k) = map(int, input().split())
	cell = n * m
	if n % 2 == 1:
		k -= m // 2
		cell -= m
	elif m % 2 == 1:
		cell -= n
	if k * 2 > cell:
		print('NO')
	elif k % 2 == 1 or k < 0:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline

def sol(n, m, k):
	if n % 2 == 0:
		m -= k // n * 2
		k = k % n
		if k > 0:
			if m == 1 or k % 2 == 1:
				return False
			return True
		else:
			return True
	elif m % 2 == 0:
		if k > 0:
			if n % 2 == 1:
				if k >= m // 2 and (k - m // 2) % 2 == 0:
					return True
				else:
					return False
			elif k % 2 == 0:
				return True
			else:
				return False
		else:
			return n % 2 == 0
	else:
		return False
T = int(input())
for _ in range(T):
	(n, m, k) = map(int, input().split())
	if sol(n, m, k):
		print('YES')
	else:
		print('NO')


ans = []
for _ in range(int(input())):
	(m, n, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			ans.append('YES')
		else:
			ans.append('NO')
		continue
	if m % 2 == 1:
		k = n * m // 2 - k
		(n, m) = (m, n)
	if k > n * m // 2 - m // 2:
		ans.append('NO')
	elif k % 2 == 1:
		ans.append('NO')
	else:
		ans.append('YES')
print('\n'.join(ans))


T = int(input())
for _ in range(T):
	(N, M, K) = map(int, input().split())
	if N % 2 == 0 and M % 2 == 0:
		print('YES' if K % 2 == 0 else 'NO')
	elif N % 2 == 0 and M % 2:
		l = N * M // 2 - K
		print('YES' if K % 2 == 0 and l * 2 >= N else 'NO')
	else:
		l = N * M // 2 - K
		print('YES' if l % 2 == 0 and K * 2 >= M else 'NO')


tests = int(input())
for t in range(tests):
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('yes')
		else:
			print('no')
	if n % 2 == 1 and m % 2 == 0:
		m2 = m // 2
		if m2 % 2 == 0:
			if k >= m2 and k % 2 == 0:
				print('yes')
			else:
				print('no')
		elif k >= m2 and k % 2 == 1:
			print('yes')
		else:
			print('no')
	if n % 2 == 0 and m % 2 == 1:
		if k % 2 == 0 and k <= n * (m - 1) // 2:
			print('yes')
		else:
			print('no')


import math
import heapq
import string
from collections import deque
import sys
input = sys.stdin.readline
S = lambda : input()
I = lambda : int(S())
M = lambda : map(int, S().split())
L = lambda : list(M())
H = 1000000000 + 7
for _ in range(I()):
	(n, m, k) = M()
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 0 and m % 2 == 1:
		k = n * m // 2 - k
		(n, m) = (m, n)
		if k >= m // 2 and (k - m // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif k >= m // 2 and (k - m // 2) % 2 == 0:
		print('YES')
	else:
		print('NO')


from collections import deque
import heapq
from math import sqrt
import operator
from operator import itemgetter
import sys
import copy
inf_var = 0
if inf_var == 1:
	inf = open('input.txt', 'r')
else:
	inf = sys.stdin
input = inf.readline

def read_one_int():
	return int(input().rstrip('\n'))

def read_one_float():
	return float(input().rstrip('\n'))

def read_list_of_ints():
	res = [int(val) for val in input().rstrip('\n').split(' ')]
	return res

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

def main():
	tests = read_one_int()
	for _ in range(tests):
		(n, m, hor) = read_list_of_ints()
		vert = n * m // 2 - hor
		square = n * m
		if n % 2:
			hor -= m // 2
			square -= m
			n -= 1
			if hor < 0:
				print('NO')
				continue
		if m % 2:
			vert -= n // 2
			square -= n
			m -= 1
			if vert < 0:
				print('NO')
				continue
		if not vert % 2 and (not hor % 2) and (square == (vert + hor) * 2):
			print('YES')
		else:
			print('NO')
main()


from sys import stdin
from collections import defaultdict
for _ in range(int(stdin.readline())):
	(n, m, k) = map(int, stdin.readline().split())
	if n % 2 == 0:
		if k % 2 == 0 and k <= n * (m // 2):
			print('Yes')
		else:
			print('No')
	elif k >= m // 2 and (k - m // 2) % 2 == 0:
		print('Yes')
	else:
		print('No')


import io
import os
import collections
import math
import functools
import itertools
import bisect
import heapq
from sys import stdin, stdout, stderr
from collections import *
from math import *
from functools import *
from itertools import *
from heapq import *
from bisect import bisect_left, bisect_right, insort_left, insort_right
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

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

def get_int():
	return int(input())

def get_str():
	return ''.join(list(map(chr, input()))[:-1])

def eprint(*args):
	stderr.write(', '.join(map(str, args)) + '\n')

def print(*args):
	stdout.write(' '.join(map(str, args)) + '\n')
t = get_int()
for tt in range(t):
	(n, m, hor) = get_ints()
	total = n * m // 2
	vert = total - hor
	h_forced = v_forced = 0
	both = n // 2 * 2 * (m // 2 * 2) // 2
	if n % 2 == 1:
		h_forced = m // 2
	elif m % 2 == 1:
		v_forced = n // 2
	if h_forced > hor or v_forced > vert:
		print('NO')
		continue
	hor -= h_forced
	vert -= v_forced
	if hor % 2 == 1 or vert % 2 == 1:
		print('NO')
		continue
	print('YES')


for dlhjk in range(int(input())):
	Homu = [int(i) for i in input().split()]
	n = Homu[0]
	m = Homu[1]
	k = Homu[2]
	if m % 2 == 0 and n % 2 == 0:
		if k % 2 == 0:
			print('YeS')
		else:
			print('nO')
	elif n % 2 == 0:
		if k % 2 == 0 and 2 * k <= (m - 1) * n:
			print('YeS')
		else:
			print('nO')
	elif (k - m * n // 2) % 2 == 0 and 2 * k >= m:
		print('YeS')
	else:
		print('nO')


import queue
from math import *
import sys
from collections import *
from random import *
from itertools import *
sys.setrecursionlimit(99999)
eps = sys.float_info.epsilon
P = 2
INF = 1000000000.0 + 1
MOD = 1000000007

def is_prime(n):
	if n == 0 or n == 1:
		return False
	d = 2
	while d * d <= n:
		if n % d == 0:
			return False
		d += 1
	return True

def div_up(n, k):
	if n % k == 0:
		return n // k
	else:
		return n // k + 1

def num_len(n, base=10):
	if n == 0:
		return 1
	return int(floor(log(n, base) + 1))

def dfs_sample(graph, cl, p, v):
	cl[v] = 1
	for to in graph[v]:
		if cl[to] == 1 and p[v] != to:
			pass
		elif cl[to] == 0:
			p[to] = v
			dfs_sample(graph, cl, p, to)
	cl[v] = 2

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

def up(a):
	for i in range(1, len(a)):
		if a[i] < a[i - 1]:
			return False
	return True

def code(c):
	return ord(c) - 32

def _hash_(s):
	(res, p) = (0, 1)
	for i in range(len(s)):
		res += code(s[i]) * p
		res %= MOD
		p *= P
		p %= MOD
	return res % MOD

def remove_edge(v, u, graph):
	graph[v].remove(u)
	graph[u].remove(v)

def dfs_stack(start, graph, visited, flags):
	global b
	stack = []
	visited[start] = True
	stack.append(start)
	while len(stack) != 0:
		v = stack.pop()
		if not flags[v]:
			b = False
		for to in graph[v]:
			if not visited[to]:
				visited[to] = True
				stack.append(to)

def all_eq(a):
	for i in range(len(a) - 1):
		if a[i] != a[i + 1]:
			return False
	return True

def solve():
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 != 0 and m % 2 == 0:
		if n == 1:
			if m == 2 * k:
				print('YES')
			else:
				print('NO')
		elif k < m // 2:
			print('NO')
		elif (k - m // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')
	else:
		k = (n * m - 2 * k) // 2
		(n, m) = (m, n)
		if n == 1:
			if m == 2 * k:
				print('YES')
			else:
				print('NO')
		elif k < m // 2:
			print('NO')
		elif (k - m // 2) % 2 == 0:
			print('YES')
		else:
			print('NO')
for _ in range(int(input())):
	solve()

def debug():
	pass


import os.path
from math import gcd, floor, ceil
from collections import *
import sys
mod = 1000000007
INF = float('inf')

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

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

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

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

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

def prl(n):
	return sys.stdout.write(str(n) + ' ')
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve():
	(n, m, k) = mp()
	if n % 2:
		if k < m // 2:
			pr('NO')
			return
		k -= m // 2
		n -= 1
	elif m % 2:
		left = n * m // 2 - k
		if left < n // 2:
			pr('NO')
			return
		m -= 1
	pr('YES' if k % 2 == 0 else 'NO')
for _ in range(inp()):
	solve()


import os, sys
from io import BytesIO, IOBase
from math import log2, ceil, sqrt, gcd
from _collections import deque
import heapq as hp
from bisect import bisect_left, bisect_right
from math import cos, sin
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')
mod = 10 ** 9 + 7

def solve1(n, m, k):
	ar = ['a', 'b']
	t = 0
	for i in range(0, m, 2):
		if k:
			a[0][i] = ar[t]
			a[0][i + 1] = ar[t]
			k[0] -= 1
			t ^= 1

def solve2(n, m, k):
	ar = ['a', 'b']
	t = 0
	for i in range(0, n, 2):
		a[i][0] = ar[t]
		a[i + 1][0] = ar[t]
		t ^= 1

def get_char(i, j):
	s = set()
	if j - 1 >= 0:
		s.add(a[i][j - 1])
		s.add(a[i + 1][j - 1])
	if i - 1 >= 0:
		s.add(a[i - 1][j])
		s.add(a[i - 1][j + 1])
	r = []
	for i in range(97, 123):
		if chr(i) not in s:
			r.append(chr(i))
		if len(r) >= 2:
			return r

def get_char1(i, j):
	s = set()
	if j - 1 >= 0:
		s.add(a[i][j - 1])
		s.add(a[i + 1][j - 1])
	if i - 1 >= 0:
		s.add(a[i - 1][j])
	r = []
	for i in range(97, 123):
		if chr(i) not in s:
			r.append(chr(i))
		if r:
			return r

def solve(n, m, k):
	for i in range(n):
		for j in range(m):
			if a[i][j] == '.':
				if k[0] >= 2 and i + 1 < n and (j + 1 < m):
					r = get_char(i, j)
					a[i][j] = r[0]
					a[i][j + 1] = r[0]
					k[0] -= 1
					a[i + 1][j] = r[1]
					a[i + 1][j + 1] = r[1]
					k[0] -= 1
				elif i + 1 < n:
					r = get_char1(i, j)
					a[i][j] = r[0]
					a[i + 1][j] = r[0]
for _ in range(int(input())):
	(n, m, k1) = map(int, input().split())
	k = [k1]
	a = [['.'] * m for _ in range(n)]
	if n % 2:
		solve1(n, m, k)
	if m % 2:
		solve2(n, m, k)
	solve(n, m, k)
	ans = True
	for i in range(n):
		for j in range(m):
			if a[i][j] == '.':
				ans = False
				break
	if ans and k[0] == 0:
		print('YES')
	else:
		print('NO')


import sys
cin = int(sys.stdin.readline().strip())
for testcase in range(cin):
	(n, m, k) = sys.stdin.readline().strip().split()
	n = int(n)
	m = int(m)
	k = int(k)
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 1:
			print('NO')
		else:
			print('Yes')
	elif n % 2 == 0 and m % 2 == 1:
		if k % 2 == 1:
			print('NO')
		elif k * 2 <= n * (m - 1):
			print('Yes')
		else:
			print('No')
	elif k >= m // 2 and (k - m // 2) % 2 == 0 and (m * (n - 1) >= (k - m // 2) * 2):
		print('Yes')
	else:
		print('No')


def main():

	def solve(n, m, k):
		if n % 2 == 0:
			if k % 2 == 0:
				if m % 2 == 0 or k <= n * (m - 1) / 2:
					return True
				else:
					return False
		elif k >= m / 2:
			if (k - m / 2) % 2 == 0:
				return True
			else:
				return False
	t = int(input())
	for _ in range(t):
		(n, m, k) = map(int, input().split(' '))
		result = solve(n, m, k)
		print('YES' if result else 'NO')
main()


t = int(input())
for i in range(t):
	(n, m, k) = map(int, input().split())
	kk = k
	a = n // 2
	b = m // 2
	c = n % 2
	d = m % 2
	sq = a * b
	h = 0
	v = 0
	if c == 1:
		h = b
	if d == 1:
		v = a
	if 2 * sq + h < k:
		print('NO')
		continue
	x = min(h, k)
	k = k - x
	if k % 2 != 0:
		print('NO')
		continue
	sq = sq - k // 2
	if v + 2 * sq != n * m // 2 - kk:
		print('NO')
		continue
	print('YES')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, m, k) = map(int, input().split())
	flag = False
	if n % 2 != 0:
		if k >= m // 2 and (k - m // 2) % 2 == 0:
			flag = True
	elif m % 2 != 0:
		(n, m) = (m, n)
		k = n * m // 2 - k
		if k >= m // 2 and (k - m // 2) % 2 == 0:
			flag = True
	elif k % 2 == 0:
		flag = True
	if flag:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	(n, m, k) = [int(x) for x in input().split()]
	if k == 0 and n % 2 == 0:
		print('YES')
	elif k == 0 and n % 2 == 1:
		print('NO')
	elif n == 1:
		if k < int(m / 2):
			print('NO')
		else:
			print('YES')
	elif n % 2 == 0:
		m2 = int(m / 2)
		con = n * m2
		if con >= k and k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 == 1:
		m2 = int(m / 2)
		if k < m2:
			print('NO')
		elif int(k / m2) % 2 == 1:
			con = m2 * (n - int(k / m2))
			if k % m2 % 2 == 0 and con >= k % m2:
				print('YES')
			else:
				print('NO')
		elif int(k / m2) % 2 == 0:
			con = m2 * (n - int(k / m2) + 1)
			if con >= m2 + k % m2 and (m2 + k % m2) % 2 == 0:
				print('YES')
			else:
				print('NO')


import sys
input = sys.stdin.readline

def domino(x, y, z, w):
	S = set()
	for (k, l) in [(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1), (z + 1, w), (z - 1, w), (z, w + 1), (z, w - 1)]:
		if 0 <= k < n and 0 <= l < m:
			S.add(ANS[k][l])
	for cc in 'abcdefghijklmnopqrstuvwxyz':
		if cc in S:
			continue
		else:
			break
	ANS[x][y] = cc
	ANS[z][w] = cc
t = int(input())
for tests in range(t):
	(n, m, k) = map(int, input().split())
	MAX = n * m // 2
	ANS = [[-1] * m for i in range(n)]
	if n % 2 == 1:
		for i in range(0, m, 2):
			domino(0, i, 0, i + 1)
			k -= 1
	elif m % 2 == 1:
		for i in range(0, n, 2):
			domino(i, 0, i + 1, 0)
	if k < 0 or k % 2 == 1:
		print('NO')
		continue
	for i in range(n):
		for j in range(m):
			if k > 0 and ANS[i][j] == -1:
				domino(i, j, i, j + 1)
				domino(i + 1, j, i + 1, j + 1)
				k -= 2
			elif ANS[i][j] == -1:
				domino(i, j, i + 1, j)
				domino(i, j + 1, i + 1, j + 1)
	if k != 0:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	(n, m, k) = [int(e) for e in input().split()]
	l = n * m // 2 - k
	g = n % 2 * (m // 2)
	k -= g
	v = m % 2 * (n // 2)
	l -= v
	n = n // 2 * 2
	m = m // 2 * 2
	if (n * m - k * 2) % 4 == 0 and k + l == n * m // 2 and (k >= 0) and (l >= 0):
		print('yes')
	else:
		print('no')


from itertools import product, permutations, combinations, accumulate, compress
import os, sys
input = lambda : sys.stdin.buffer.readline().rstrip(b'\r\n')

def dbp(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)
a_str = lambda : input().decode('ascii')
get_int_list = lambda : [int(x) for x in input().split()]
join_str = lambda l, ch=' ': ch.join((str(x) for x in l))

def wa4(h, w, horzs, verts):
	if h % 2 == 1:
		horzs -= w // 2
		if horzs < 0 or horzs % 2 == 1 or verts % 2 == 1:
			return 'NO'
		else:
			return 'YES'
	elif w % 2 == 1:
		verts -= h // 2
		if verts < 0 or horzs % 2 == 1 or verts % 2 == 1:
			return 'NO'
		else:
			return 'YES'
	else:
		return 'YES' if horzs % 2 == 0 == verts % 2 else 'NO'

def do_thing():
	(h, w, k) = get_int_list()
	verts = h * w // 2 - k
	dbp('case:', h, w, k, verts)
	return wa4(h, w, k, verts)

def multicase():
	maxcc = int(input().strip())
	for cc in range(maxcc):
		print(do_thing())
multicase()


NUM = int(input())
for _ in range(0, NUM):
	(n, m, k) = map(int, input().split())
	if n % 2 == 0 and m % 2 == 0:
		if k % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif n % 2 != 0 and m % 2 == 0:
		if k < m // 2:
			print('NO')
		else:
			k = k - m // 2
			if k % 2 == 0:
				print('YES')
			else:
				print('NO')
	elif k <= n * m // 2 - n // 2 and k % 2 == 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split(' '))
	if b == 1:
		if c == 0:
			print('yes')
		else:
			print('no')
		continue
	if a == 1:
		if c == b // 2:
			print('yes')
		else:
			print('no')
		continue
	if a % 2 == 0 and b % 2 == 0:
		p = a * b // 2
		if c in range(p, -1, -2):
			print('yes')
		else:
			print('no')
	elif b % 2 == 0:
		if c >= b // 2:
			p = a * b // 2
			if c in range(p, 0, -2):
				print('yes')
			else:
				print('no')
		else:
			print('no')
	else:
		p = b // 2
		if c in range(a * p, -1, -2):
			print('yes')
		else:
			print('no')


t = int(input())
for _ in range(t):
	(n, m, k) = map(int, input().split())
	if n == 1:
		if k == m / 2:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if m == 1:
		if k == 0:
			print('Yes')
			continue
		else:
			print('No')
			continue
	if n % 2 == m % 2 == 0:
		if k % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif n % 2 == 1:
		if k >= int(m / 2) and (k - int(m / 2)) % 2 == 0:
			print('Yes')
		else:
			print('No')
	elif k % 2 == 0 and k <= n * (m - 1) / 2:
		print('Yes')
	else:
		print('No')


import sys
import os
import math
from io import BytesIO, IOBase
from collections import defaultdict, Counter, deque
import bisect
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')
t = int(input())
for i in range(t):
	(n, m, k) = map(int, input().split())
	if n & 1:
		if m & 1 or 2 * k < m:
			print('NO')
			continue
		else:
			k -= m // 2
			n -= 1
	if m & 1:
		m -= 1
	for j in range(0, m, 2):
		if k >= n:
			k -= n
		else:
			if k % 2 == 0:
				print('YES')
			else:
				print('NO')
			break
	else:
		if k == 0:
			print('YES')
		else:
			print('NO')


from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from math import ceil, floor, log
from collections import Counter, deque
from heapq import heappush, heappop, heapify
from itertools import permutations

def re():
	return stdin.readline().rstrip()

def mapi():
	return map(int, re().split())

def veci():
	return list(map(int, re().split()))
mod = 1000000007

def solve(n, m, k):
	miku = n * m // 2
	if k > miku:
		return 'No'
	if not n & 1 and (not m & 1):
		if not k & 1:
			return 'Yes'
		else:
			return 'No'
	elif not n & 1:
		if not k & 1 and k <= n * (m - 1) // 2:
			return 'Yes'
		else:
			return 'No'
	else:
		k -= m // 2
		if k >= 0 and (not k & 1):
			return 'Yes'
		else:
			return 'No'
for t in range(int(re())):
	(n, m, k) = mapi()
	print(solve(n, m, 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 = 'a1' 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()

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

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

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

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

def print_list(l):
	print(' '.join(map(str, l)))
from heapq import *
from collections import deque as dq
from math import ceil, floor, sqrt, pow, factorial, log2
import bisect as bs
from collections import Counter
from itertools import permutations
for _ in range(N()):
	(n, m, k) = RL()
	v = n * m // 2 - k
	if n % 2 == 1:
		k -= m // 2
	if m % 2 == 1:
		v -= n // 2
	if v >= 0 and k >= 0 and (k % 2 == 0) and (v % 2 == 0):
		print('YES')
	else:
		print('NO')