Problem:
 Score : 200 points    Problem Statement We have a grid with N rows and M columns of squares. Initially, all the squares are white.  There is a button attached to each row and each column.
When a button attached to a row is pressed, the colors of all the squares in that row are inverted; that is, white squares become black and vice versa.
When a button attached to a column is pressed, the colors of all the squares in that column are inverted.  Takahashi can freely press the buttons any number of times. Determine whether he can have exactly K black squares in the grid.      Constraints  1 \leq N,M \leq 1000  0 \leq K \leq NM         Input Input is given from Standard Input in the following format:  N  M  K       Output If Takahashi can have exactly K black squares in the grid, print Yes ; otherwise, print No .        Sample Input 1 2 2 2      Sample Output 1 Yes  Press the buttons in the order of the first row, the first column.       Sample Input 2 2 2 1      Sample Output 2 No       Sample Input 3 3 5 8      Sample Output 3 Yes  Press the buttons in the order of the first column, third column, second row, fifth column.       Sample Input 4 7 9 20      Sample Output 4 No

Solution (Python):
N,M,K = map(int,input().split())

for row in range(N+1):
    for colum in range(M+1):
        black = row * M
        black -= row * colum
        black += (N - row) * colum
        if black == K:
            print("Yes")
            exit()

print("No")

Solution (Python):
n,m,k=map(int,input().split())
ans="No"
for i in range(n+1):
  if (2*i-n)==0:
    if k==m*n//2:
      ans="Yes"
  else:
    if (k-n*m+m*i)%(2*i-n)==0 and 0<=(k-n*m+m*i)//(2*i-n)<=m:
      ans="Yes"
print(ans)

Solution (Python):
n,m,k=map(int,input().split())
ans="No"
for i in range(n//2+1):
  for j in range(m):
    o=i*j+(m-j)*(n-i)
    x=n*m-o
    if o==k or x==k:
      ans="Yes"
print(ans)

Solution (Python):

n, m, k = map(int, input().split())
for i in range(n + 1):
    a = k - i * m
    b = n - 2 * i
    if b != 0 and a % b == 0 and 0 <= a // b <= m:
        print("Yes")
        exit()
print("No")

Solution (Python):

n, m, k = map(int, input().split())
for i in range(n + 1):
    for j in range(m + 1):
        if m * i + j * n - 2 * i * j == k:
            print("Yes")
            exit()
print('No')

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, M, K = mapint()
s = set()
for i in range(N+1):
    for j in range(M+1):
        s.add(i*M+j*N-i*j*2)

if K in s:
    print('Yes')
else:
    print('No')

Solution (Python):






N,M,K = map(int, input().split())





for n in range(N+1):
    for m in range(M+1):
        if (N-n)*m + (M-m)*n == K:
            print("Yes")
            break
    else:
        continue
    break
else:
    print("No")

Solution (Python):
import sys
N, M, K = list(map(int, input().split()))
for i in range(N + 1):
    for j in range(M + 1):
        if (M - j) * i + (N - i) * j == K:
            print('Yes')
            sys.exit()
print('No')

Solution (Python):
import sys
input = sys.stdin.readline

N,M,K=list(map(int,input().split()))
for iN in range(N+1):
    for iM in range(M+1):
        tmp = (N-iN)*(iM)+(iN)*(M-iM)
        if tmp == K:
            print('Yes')
            exit()
print('No')

Solution (Python):
ROW, COL, K = map(int, input().split())
for row in range(ROW + 1):
    for col in range(COL + 1):
        if row * (COL - col) + col * (ROW - row) == K:
            print('Yes')
            exit()
print('No')

Solution (Python):


n, m, k = map(int, input().split())

s = set()
for i in range(n + 1):
    for j in range(m + 1):
        t = i * (m - j) + j * (n - i)
        if t <= n * m:
            s.add(t)
if k in s:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n, m, k = map(int, readline().split())

    for row in range(n + 1):
        for col in range(m + 1):
            count = n * m - (row * col) - ((n - row) * (m - col))
            if count == k:
                return print("Yes")

    print("No")


if __name__ == '__main__':
    main()

Solution (Python):
N,M,K=map(int,input().split())

if K% N==0 or K%M==0:
    print('Yes')
else:
    answers=[]
    for n in range(1,N+1):
        for m in range(1,M+1):
            answer=0
            answer+=n*M+m*N-n*m*2
            answers.append(answer)
    for n in range(1,M+1):
        for m in range(1,N+1):
            answer=0
            answer+=n*N+m*M-n*m*2
            answers.append(answer)
    if K in answers:
        print('Yes')
    else:
        print('No')

Solution (Python):
N, M, K = map(int, input().split())

isok = False
for x in range(N+1):
    for y in range(M+1):
        if x*(M-y)+y*(N-x) == K:
            isok = True
            break

print('Yes' if isok else 'No')

Solution (Python):
def resolve():
    '''
    code here
    '''
    N, M, K = [int(item) for item in input().split()]
    
    is_found = False
    for i in range(N+1):
        for j in range(M+1):
            if i*M + j*N -2*j*i == K:
                is_found = True
                break
    print('Yes') if is_found else print('No')

if __name__ == "__main__":
    resolve()

Solution (Python):
N, M, K = map(int, input().split())
  
for i in range(N+1):
  for j in range(M+1):
    if K == (N-i)*j + i*(M-j):
      print('Yes')
      exit()
      
print('No')

Solution (Python):
a,b,c=map(int,input().split())
for i in range(a+1):
    for j in range(b+1):
        if (a-i)*j+(b-j)*i==c:
            print('Yes')
            exit()
print('No')

Solution (Python):









import os
import sys


def main():
    n, m, k = map(int, input().split())
    for s in range(m+1):
        for t in range(n+1):
            if k == n*s+m*t-2*s*t:
                print("Yes")
                return
    print("No")


if __name__ == "__main__":
    main()

Solution (Python):
import sys

def main():
    n, m, k = map(int, input().split())
    cnt = set()
    for x in range(n+1):
        for y in range(m+1):
            tmp = x*y + (n-x)*(m-y)
            if tmp not in cnt:
                cnt.add(tmp)

    if k in cnt:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Solution (Python):
N, M, K = map(int, input().split())

flag = False
for i in range(M+1):
  for j in range(N+1):
    tmp = N*i + M*j - 2*i*j
    if tmp == K:
      flag = True
      break
      
if flag:
  print('Yes')
else:
  print('No')

Solution (Python):
n, m, k = map(int, input().split())
for i in range(n + 1):
    for j in range(m + 1):
        if i * (m - j) + j * (n - i) == k:
            print("Yes")
            exit()
print("No")

Solution (Python):

"""
やるか・やらないかだけで、結果的にできるものは同じ。順序に関係はない。
縦・横にいくつ使うかを全探索で求まった。
"""
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n,m,k = map(int,readline().split())

for i in range(n+1):
    for j in range(m+1):
        dup = i*j*2
        res = i*m + j*n - dup
        if k == res:
            print("Yes")
            exit()

print("No")

Solution (Python):
import sys

N, M, K = map(int, sys.stdin.readline().split())


for i in range(N+1):
    tmp = i * M
    for j in range(M+1):
        tmp += (N - 2 * i)
        if tmp == K:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):
N,M,K = map(int,input().split())


for i in range(N+1):
    for j in range(M+1):
        count = i*M+j*N-2*i*j
        if count == K:
            print('Yes')
            exit()
print('No')

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007



def main():
	
	n, m, k = tin()
	
	for ni in range(n+1):
		for mi in range(m+1):
			nb = ni*(m-mi) + (n-ni)*mi
			if k == nb:
				return 'Yes'
	return 'No'

	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
def resolve():
    n, m, k = map(int, input().split())
    OK = False
    for i in range(n+1):
        for j in range(m+1):
            if i*m+(n-2*i)*j == k:
                OK = True
    if OK:
        print("Yes")
    else:
        print("No")
resolve()

Solution (Python):
n,m,k = map(int,input().split())
for i in range(0,n+1):
    for j in range(0,m+1):
        if n*j+m*i-2*i*j == k:
            print("Yes")
            exit(0)
print("No")

Solution (Python):
N,M,K = map(int,input().split())
if N==1 or M==1:
    flag = 1
else:
    flag = 0
    for i in range(N+1):
        for j in range(M+1):
            if M*i+N*j-2*i*j==K:
                flag = 1
                break
        if flag==1:break
if flag==1:
    print("Yes")
else:
    print("No")

Solution (Python):
N,M,K = map(int,input().split())

for x in range(N+1):
  for y in range(M+1):
    kuro = x*(M-y)+y*(N-x)
    if kuro == K:
      print("Yes")
      exit()
print("No")

Solution (Python):
N,M,K = map(int,input().split())

for i in range(N+1):
    for j in range(M+1):
        t = i*M + j*N - i*j*2
        if t==K:
            print('Yes')
            exit()
print('No')

Solution (Python):
import sys
n,m,k=map(int,input().split())
for i in range(n+1):
  for j in range(m+1):
    if i*j+(n-i)*(m-j)==k:
      print('Yes')
      sys.exit()
print('No')

Solution (Python):
n,m,k = map(int, input().split())

for i in range(n+1):
    for j in range(m+1):
        if i*(m-j) + j*(n-i) == k:
            print("Yes")
            exit()
print("No")

Solution (Python):
def main():
    n,m,k = map(int,input().split())
    for i in range(n+1):
        for j in range(m+1):
            if i*(m-j)+j*(n-i) == k:
                print('Yes')
                return 0
    print('No')

if __name__ == '__main__':
    main()

Solution (Python):
n,m,k = map(int,input().split())
ans = 0
for i in range(n+1):
    for j in range(m+1):
        a = i*m + j*n - 2*i*j
        if a == k:
            ans = 1
            break
print(["No","Yes"][ans])

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

n, m, k = inm()


def solve():
    for x in range(n + 1):
        for y in range(m + 1):
            a = m * x + n * y - 2 * x * y
            if a == k:
                return True
    return False


print("Yes" if solve() else "No")

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd, ceil



import string

from bisect import bisect_left
MOD = int(1e9)+7
INF = float('inf')


def solve():
    
    n, m, k = [int(x) for x in input().split()]
    s = set()
    for i in range(n+1):
        for j in range(m+1):
            x = m * i + n * j - 2 * (i * j)
            s.add(x)

    if k in s:
        print("Yes")
    else:
        print("No")


t = 1

for case in range(1,t+1):
    ans = solve()


"""

azyxwvutsrqponmlkjihgfedcb

"""

Solution (Python):
h,w,k = map(int,input().split())
for x in range(1001):
    for y in range(1001):
        if w*x + h*y - 2*x*y == k and 0<= x <= h and 0<= y <= w:
            print("Yes")
            exit()
print("No")

Solution (Python):
n,m,k = map(int, input().split())


for i in range(n+1):
  for j in range(m+1):
    if i*(m-j) + j*(n-i) == k:
      print("Yes")
      exit()
print("No")

Solution (Python):
N,M,K = map(int,input().split())
ans = "No"

for a in range(N+1):
  if N - 2*a != 0:
    if (K - a*M) % (N - 2*a) == 0:
      if M >= (K - a*M) / (N - 2*a) >= 0:
        ans = "Yes"
print(ans)

Solution (Python):
N,M,K = map(int,input().split())
ans = "No"

for k in range(N+1):
  for l in range(M+1):
    if k*(M-l) + l*(N-k) == K:
      ans = "Yes"
print(ans)

Solution (Python):
n, m, k = map(int, input().split())
for i in range(n+1):
  for j in range(m+1):
    if (n-i)*j + (m-j)*i == k:
      print('Yes')
      exit()
print('No')

Solution (Python):
n,m,k=map(int,input().split())
for i in range(n+1):
    for j in range(m+1):
        if k==i*m+j*n-2*i*j:
            print("Yes")
            exit()
print("No")

Solution (Python):
a,b,k=map(int,input().split())
n=a*b+1
ans=[0]*n
for i in range(a+1):
    for j in range(b+1):
        ans[a*j+b*i-2*i*j]=1
print("Yes" if ans[k] else "No")

Solution (Python):
n,m,k=map(int,input().split())
ans=0
for i in range(0,n+1):
  for j in range(0,m+1):
    if m*i+(n-i*2)*j==k:
      ans=1
      break
  if ans==1:
    print("Yes")
    break
else:
  print("No")

Solution (Python):
N, M, K = map(int, input().split())

for n in range(N + 1):
    for m in range(M + 1):
        if n * M + m * N - n * m * 2 == K:
            print('Yes')
            exit()

print('No')

Solution (Python):
import sys
input = sys.stdin.readline

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

def main():
    mod=10**9+7
    N,M,K=MI()
    flag=0
    
    for i in range(N+1):
        for j in range(M+1):
            temp=i*M+j*N-(i*j)*2
            if temp==K:
                flag=1
                break
            
            
    if flag:
        print("Yes")
    else:
        print("No")

main()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    N, M, K = MI()
    
    if K == 0:
        print('Yes')
        return

    for i in range(N+1):
        for j in range(M+1):
            jd = i * (M - j) + j * (N - i)
            
            if jd == K:
                print('Yes')
                return
    print('No')


if __name__ == '__main__':
    solve()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    N, M, K = MI()
    
    if K == 0:
        print('Yes')
        return

    for i in range(N+1):
        cnt = i * M
        for j in range(M+1):
            
            jd = cnt + (N - 2 * i) * j
            
            if jd == K:
                print('Yes')
                return
    print('No')


if __name__ == '__main__':
    solve()

Solution (Python):
n,m,k = map(int, input().split())
for i in range(n+1):
	for j in range(m+1):
		if i*m-i*j+j*n-i*j==k:
			print('Yes')
			exit()
print('No')

Solution (Python):
(N,M,K) = map(int,input().split())

for i in range(N+1):
    for j in range(M+1):
        if i*(M-j)+j*(N-i) == K:
            print('Yes')
            flag = 1
            break
        else:
            flag = 0
    if flag == 1:
        break
else:
    print("No")

Solution (Python):
n, m, k = list(map(int, input().split()))

flag = False
for y in range(n+1):
    if n - 2 * y == 0:
        continue
        
    x = (k - m * y) / (n - 2 * y)
    
    if (k - m * y) % (n - 2 * y) == 0 and (0 <= x and x <= m):
        flag = True
        break
print("Yes" if flag else "No")

Solution (Python):
n, m, k = list(map(int, input().split()))

flag = False
for y in range(m+1):
    for x in range(n + 1):
        if n * y + m * x - 2 * x * y == k:
            flag = True
            break
print("Yes" if flag else "No")

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n,m,k = list(map(int, input().split()))
ans = "No"
for i in range(n+1):
    for j in range(m+1):
        val = i*j + (n-i)*(m-j)

        if val==k:
            ans = "Yes"
            break
    if ans=="Yes":
        break
print(ans)

Solution (Python):
import sys
n,m,k=map(int,input().split())


for p in range(n+1):
    for q in range(m+1):
        ans=p*m + q*n - 2*p*q
        if(ans==k):
            print('Yes')
            sys.exit()
else:
    print('No')

Solution (Python):
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, m, k = MAP()
for i in range(n+1):
    for j in range(m+1):
        if k == i*(m-j) + (n-i)*j:
            print("Yes")
            exit()
print("No")

Solution (Python):
n, m, k = [int(w) for w in input().split()]

cond = False

for i in range(n + 1):
    for j in range(m + 1):
        b = i * (m - j) + j * (n - i)
        if b == k:
            cond = True
            break
    if cond:
        break

print("Yes" if cond else "No")

Solution (Python):
N, M, K = map(int, input().split())
for i in range(N):
  for j in range(M):
    s = i * j + (N-i) * (M-j)
    if s == K or N*M - s == K:
      print("Yes")
      exit()
print("No")

Solution (Python):
n, m, k = map(int, input().split())

for i in range(n + 1):
    for j in range(m + 1):
        if i * (m - j) + (n - i) * j == k:
            print('Yes')
            exit()
print('No')

Solution (Python):
n,m,k = map(int, input().split())

for i in range(n+1):
    for j in range(m+1):
        check = i*(m-j) + j*(n-i)
        if check == k:
            print('Yes')
            exit()
else:
    print('No')

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N,M,K = I()
for i in range(N+1):
    for j in range(M+1):
        if i*(M-j)+j*(N-i) == K:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007



def main():
	
	n, m, k = tin()
	
	for ni in range(n+1):
		for mi in range(m+1):
			bn = ni*(m-mi) + (n-ni)*(mi)
			if bn == k:
				return 'Yes'
	return 'No'
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
N,M,K = map(int,input().split())

for n in range(N+1):
  for m in range(M+1):
    if K == m*N+n*M-2*(n*m):
      print('Yes')
      exit()
print('No')

Solution (Python):
n, m, k = map(int, input().split())
ans = 'No'
for i in range(n+1):
    for j in range(m+1):
        if i*(m-j)+j*(n-i)==k:
            ans = 'Yes'
            break
print(ans)

Solution (Python):
N,M,K = map(int, input().split())

for i in range(N+1):
	for j in range(M+1):
		if j*(N-i)+i*(M-j) == K:
			print('Yes')
			exit()
print('No')

Solution (Python):
import sys

if __name__ == "__main__":
    N, M, K = [int(x) for x in input().split(" ")]
    if M < N:
        N, M = M, N
    for x in range(0, N + 1):
        for y in range(0, M + 1):
            if x * (M - y) + (y * (N - x)) == K:
                print("Yes")
                sys.exit(0)
    print("No")

Solution (Python):
from itertools import product
n, m, k = map(int, input().split())

for i,j in product(range(n + 1), range(m + 1)):
    if i * (m - j) + j * (n - i) == k:
        print('Yes')
        break
else:
    print('No')

Solution (Python):


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union






























def main():
    Num = Union[int, float]
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())


    def check(n, m, k):
        for i in range(n + 1):
            for j in range(m + 1):
                if i * j + (n - i) * (m - j) == k:
                    return True
        return False
    
    
    n, m, k = mi()
    print('Yes') if check(n, m, k) else print('No')
        


if __name__ == "__main__":
    main()

Solution (Python):
N,M,K=map(int,input().split())
for i in range(N+1):
    for j in range(M+1):
        if (N-i)*j+(M-j)*i==K:
            print("Yes")
            exit()
else:
    print("No")

Solution (Python):
n, m, k = map(int, input().split())

ans = 'No'
for n_ in range(n+1):
    for m_ in range(m+1):
        if n_*(m-m_) + m_*(n-n_) == k:
            ans = 'Yes'

print(ans)

Solution (Python):
N,M,K = map(int, input().split())

NG_flag = True

for i in range(0,N+1):
    for j in range(0,M+1):
        if i*M + j*N - 2*i*j == K:
            NG_flag = False
            print("Yes")
            break
    
    if NG_flag == False:
        break
else:
    print("No")

Solution (Python):
def readinput():
    n,m,k=list(map(int,input().split()))
    return n,m,k

def main(n,m,k):
    for x in range(0,m+1):
        for y in range(0,n+1):
            if (n-y)*x+y*(m-x)==k:
                return 'Yes'
    return 'No'

if __name__=='__main__':
    n,m,k=readinput()
    ans=main(n,m,k)
    print(ans)

Solution (Python):
def main():
    n, m, k = list(map(int, input().split()))
    for i in range(n + 1):
        for j in range(m + 1):
            if (n * j + m * i) - 2 * i * j == k:
                print('Yes')
                exit()
    print('No')


if __name__ == '__main__':
    main()

Solution (Python):
n, m, k = map(int, input().split())
flag = False
for r in range(n+1):
    for c in range(m+1):
        if m*r + n*c - 2*c*r == k:
            flag = True
            break
    if flag:
        break
print('Yes' if flag else 'No')

Solution (Python):

import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def read_ints(): return list(map(int, read().split()))


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  


N, M, K = read_ints()
for n, m in product(range(N + 1), range(M + 1)):
    
    if K == (M - m) * n + (N - n) * m:
        print('Yes')
        exit()
print('No')

Solution (Python):
'''
Accepted    　:No
difficult   　:
ペナルティ　  　:5分
実際の回答時間  :分
WAの回数　     :回
合計時間　　  　:分
'''


def myAnswer(N: int, M: int, K: int) -> int:
   ans = set([0])
   for i in range(M):
      ans.add(N * (i + 1))
      ans.add(M - (i + 1) + (N - 1) * (i + 1))
   for i in range(N):
      ans.add(M * (i + 1))
      ans.add(N - (i + 1) + (M - 1) * (i + 1))
   print(ans)
   return "Yes" if K in ans else "No"

def modelAnswer(N,M,K):
   for k in range(N + 1):
      for l in range(M + 1):
         if k * (M - l) + l * (N - k) == K:
            return "Yes"
   return "No"
def main():
   N, M, K=map(int, input().split())
   print(modelAnswer(N, M, K))
if __name__ == '__main__':
   main()

Solution (Python):
n,m,k=map(int,input().split())

can=[]
for i in range(n+1):
    for j in range(m+1):
        can.append(n*j+i*m - 2*i*j)





















if (k in can): 
    print('Yes')
else:
    print('No')

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7


N, M, K = MAP()

for i in range(N+1):
	for j in range(M+1):
		if M*i + N*j - 2*i*j == K:
			print("Yes")
			break
	else:
		continue
	break
else:
	print("No")

Solution (Python):
n,m,k = list(map(int, input().split()))
for i in range(n+1):
    for j in range(m+1):
        if i*m+j*n-2*i*j==k:
            print('Yes')
            exit()

print('No')

Solution (Python):
N, M, K = map(int, input().split())

for k in range(N+1):
    for l in range(M+1):
        if k * (M-l) + l * (N-k) == K:
            print("Yes")
            import sys
            sys.exit()

print("No")

Solution (Python):
N, M, K = map(int, input().split())

for i in range(N+1):
    for j in range(M+1):
        if i*(M-j) + j*(N-i) == K:
            print('Yes')
            break
    else:
        continue
    break
else:
    print('No')

Solution (Python):
N, M, K = map(int, input().split())

for x in range(M+1):
  for y in range(N+1):
    if x*N + y*M - 2*x*y == K:
      print('Yes')
      exit()
print('No')

Solution (Python):
n,m,k = map(int, input().split())

for i in range(n+1):
    for j in range(m+1):
        if i*(m-j) + j*(n-i) == k:
            print("Yes")
            exit()
print("No")

Solution (Python):
import sys
readline = sys.stdin.readline

N,M,K = map(int,readline().split())

for a in range(N + 1):
  for b in range(M + 1):
    if a * (M - b) + (N - a) * b == K:
      print("Yes")
      exit(0)
else:
  print("No")

Solution (Python):
import sys
n,m,k=map(int,input().split())
for i in range(n+1):
  for j in range(m+1):
    if (i*j)+(n-i)*(m-j)==k:
      print('Yes')
      sys.exit()
print('No')

Solution (Python):
h,w,k=map(int,input().split())
ans="No"
for i in range(h+1):
  for j in range(w+1):
    if i*j+(h-i)*(w-j) == k:
      ans="Yes"
print(ans)

Solution (Python):
H,W,target = map(int,input().split())
res = 'No'
for w in range(0,W+1):
    for h in range(0,H+1):
        num_black = w * h + (W-w)*(H-h)
        if num_black == target:
            res = 'Yes'
print(res)

Solution (Python):
N, M, K = map(int, input().split())

for r in range(N+1):
    for c in range(M+1):
        black = (M*r)+(N*c)-(r*c*2)
        if black == K:
            print('Yes')
            exit(0)
print('No')

Solution (Python):
N, M, K = map(int, input().split())

black = 0

for i in range(N+1):
    for j in range(M+1):
        black = i * M + j * N - 2 * i * j
        if K == black:
            print('Yes')
            exit()
print('No')

Solution (Python):
n,m,k = map(int, input().split())
flag=0
for i in range(n+1):
    for j in range(m+1):
        if n*j+m*i-2*i*j==k:
            print("Yes")
            flag=1
            break
    if flag:
        break
if not flag:
    print("No")