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 i in range(n+1):
    for j in range(m+1):
        
        if k == m*i+j*n-i*j*2:
            print("Yes")
            exit()
print("No")

Solution (Python):
H, W, K = map(int, input().split())
for h in range(0, H+1):
  for w in range(0, W+1):
    if h*W + w*H - 2*h*w == 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):
    a = m*i + n*j - 2*i*j
    if a == 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):
    black = M * i + N * j - i * j * 2
    
    if black == K:
      print('Yes')
      exit()

print('No')

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

Solution (Python):
import sys

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")
            sys.exit()

print("No")

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

for row in range(n+1):
    for col in range(m+1):
        if row * m + col * n - 2 * (row * col) == k:
            print('Yes')
            exit()

print('No')

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

def hantei(n,m,k):
    for i in range(n+1):
        for j in range(m+1):
            if i*m + j*(n-2*i)==k:
                return True
    return False

print("Yes" if hantei(n,m,k) else "No")

Solution (Python):





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

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

print("No")

Solution (Python):
N, M, K = map(int, input().split())
f = 0
for i in range(0, N+1):
  if N == 2 * i:
    if K == i * M:
      print("Yes")
      f = 1
      break
  elif (K - i * M) % (N - 2 * i) == 0 and 0 <= (K - i * M) // (N - 2 * i) <= M:
    print("Yes")
    f = 1
    break
if f == 0:
  print("No")

Solution (Python):

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

Solution (Python):

import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


N, M, K = LI()

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 n in range(N + 1):
        for m in range(M + 1):
            black = n * (M - m) + (N - n) * m
            if black == K:
                print('Yes')
                return
    print('No')


if __name__ == '__main__':
    main()

Solution (Python):
import sys, math, re
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD = 10**9+7

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

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

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

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N, M, K = mi()

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

    print('No')


if __name__ == "__main__":
    main()

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

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

Solution (Python):
def solve():
    N, M, K = 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:
                return 'Yes'
    return 'No'

print(solve())

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

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

Solution (Python):
import sys

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

for n in range(0, N+1):
  for m in range(0, M+1):
    if (N - n) * m + n * (M - m) == K:
      print("Yes")
      sys.exit()
print("No")

Solution (Python):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n, m, k = LI()
    for i in range(n):
        for j in range(m+1):
            if i*m + j*(n-2*i) == k:
                print("Yes")
                exit(0)
    else:
        print("No")
main()

Solution (Python):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n, m, k = LI()
    for i in range(n):
        unit = n-2*i

        if unit == 0:
            if k == i*m:
                print("Yes")
                break
        else:
            j = (k-i*m)//(n-2*i)
            jr = (k-i*m)%(n-2*i)

            if 0 <= j <= m and jr == 0:
                print("Yes")
                break
    else:
        print("No")
main()

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): 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)
sys.setrecursionlimit(10 ** 6)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()

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")
            exit()

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*n - 2*m*n) == K:
      ans = "Yes"
      break
print(ans)

Solution (Python):
from sys import exit
N, M, K  = map(int, input().split())
if K == 0:
    print("Yes")
    exit()
for n in range(N + 1):
    for m in range(M + 1):
        if (N - n) * (M - m) + n * m == K:
            print("Yes")
            exit()
print("No")

Solution (Python):
'''
Created on 2020/09/08

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N,M,K=map(int,pin().split())
  for i in range(N+1):
    for j in range(M+1):
      if i*(M-j)+(N-i)*j==K:
        print("Yes")
        return
  print("No")
  return
main()

Solution (Python):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n,m,k=nii()

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

print('No')

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


N,M,K = MI()
a = sum(K == i*(M-j)+j*(N-i) for i in range(N+1) for j in range(M+1))
print('Yes' if a != 0 else 'No')

Solution (Python):
def main():
    N,M,K = map(int,input().split())
    if K == 0 or K == N*M:
        return ('Yes')
    ans_dict = {}
    ans_dict[K] = False
    for i in range(N):
        for j in range(M+1):
            ans_dict[i*M + (N-i-i)*j] = True
    if ans_dict[K] == True:
        return('Yes')
    else:
        return('No')

print(main())

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,m,k = inpl()
for i in range(n+1):
    for j in range(m+1):
        now = i*m+j*n-i*j*2
        if now == k:
            print('Yes')
            quit()
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) + j*(n-i):
            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 n in range(N+1):
    for m in range(M+1):
        s.add(n*M + m*N - n*m*2)

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

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

Solution (Python):
n, m, k = map(int, input().split())
for i in range(n + 1):
    for j in range(m + 1):
        black = i * (m - j) + (n - i) * j
        if black == 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 m*i+n*j-2*i*j==k:
            print("Yes")
            exit()
print("No")

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  


N,M,K = MI()

for i in range(N+1):
    for j in range(M+1):
        if K == i*(M-j)+j*(N-i):
            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
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right 
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from functools import reduce
from math import sin, cos, tan, asin, acos, atan, degrees, radians

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def powmod(n,i,mod):
    return pow(n,mod-1+i,mod) if i<0 else pow(n,i,mod)
def div2(x):
    return x.bit_length()
def div10(x):
    return len(str(x))-(x==0)
def perm(n,mod=None):
    ans = 1
    for i in range(1,n+1):
        ans *= i
        if mod!=None:
            ans %= mod
    return ans
def intput():
    return int(input())
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x,d=1):
        self.setdefault(x,0)
        self[x] += d
class comb():
    def __init__(self, n, mod=None):
        self.l = [1]
        self.n = n
        self.mod = mod
    def get(self,k):
        l,n,mod = self.l, self.n, self.mod
        k = n-k if k>n//2 else k
        while len(l)<=k:
            i = len(l)
            l.append(l[i-1]*(n+1-i)//i if mod==None else (l[i-1]*(n+1-i)*powmod(i,-1,mod))%mod)
        return l[k]

N,M,K = mint()
ans = False
for i in range(N+1):
    for j in range(M+1):
        if i*(M-j)+(N-i)*j==K:
            ans = True
            break
judge(ans)

Solution (Python):


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


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 i*m-2*i*j+j*n == 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-2*i*j==K:
            print('Yes')
            exit()
print('No')

Solution (Python):
import sys
import heapq


input = sys.stdin.readline
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")
            exit(0)

print("No")

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

for i in range(n+1):
    for j in range(m+1):
        ans = i*m + j*n - i*j*2
        if ans == 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 - 2*i*j) == k:
            print("Yes")
            exit()
print("No")

Solution (Python):
n, m, k = map(int, input().split())
s = [[0 for i in range(n)]for j in range(m)]
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):
def main2():
    N, M, K = map(int, input().split())

    for i in range(N + 1):
        for j in range(M + 1):
            b = i * (M - j) + j * (N - i)

            if b == K:
                print("Yes")
                exit()

    print("No")

if __name__ == "__main__":
    main2()

Solution (Python):
n,m,k = map(int,input().split())
flag = False
for i in range(n+1):
    for j in range(m+1):
        if (n-2*i)*(m-2*j) == n*m-2*k:
            print("Yes")
            flag = True
            break
    if flag == True:
        break
if flag == False:
    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 (i*m + j*n) -(2*i*j) == k:
            flag = 1
            break

if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
from collections import deque
n, m, k = map(int, input().split())
ans = []
for i in range(0, n + 1):
    for j in range(0, m + 1):
        cnt = (i * m) + (j * n) - 2 * (i * j)
        
        ans.append(cnt)
if k in ans:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N, M, K = [int(x) for x in input().split()]

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

    print("No")

if __name__ == '__main__':
    main()

Solution (Python):
n,m,k=map(int,input().split())
f=False
for i in range(n+1):
    for j in range(m+1):
        if k==i*m+j*n-2*i*j:
            print('Yes')
            f=True
            break
    if f:
        break
if not f:
    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) + m * (N - n) == K:
            print("Yes")
            exit()
else:
    print("No")

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



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

Solution (Python):
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

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")
                exit()
    print("No")





if __name__=="__main__":
    main()

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

def is_able(n, m, k):
    res = defaultdict(bool)
    res[0] = True
    for i in range(1, n+1):
        for j in range(1, m+1):
            count = 0
            count += i*j
            count += (n-i)*(m-j)
            res[count] = True
    return res[k]


if is_able(n, m, k):
    print("Yes")
else:
    print("No")

Solution (Python):
N, M, K = map(int, input().split())
for i in range(N+1):
	
	
	a = K - i*M
	if a == 0:
		print("Yes")
		exit()
	
	b = N - 2*i
	if b != 0:
		if a%b == 0 and a*b > 0 and a//b < 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*n-2*i*j==k:ans='Yes'
print(ans)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N, M, K = MAP()

    l = []
    for i in range(N+1):
        for j in range(M+1):
            l.append(M*i + N*j - i*j*2)

    print("Yes" if K in set(l) else "No")


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, M, K = MAP()

A = []
for i in range(N+1):
    for j in range(M+1):
        tmp = M * i + N * j - i * j * 2
        A.append(tmp)

if K in set(A):
    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(0)
print(('No'))

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

p = False
for ni in range(m+1):
    for mi in range(n+1):
        if k == ni*n + mi*m - 2*(ni*mi):
            p = True
            break

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

Solution (Python):
import sys












stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    
    n,m,k = map(int, stdin.readline().rstrip().split())
    
    
    
    
    
    for i in range(n+1):
        for j in range(m+1):
            if k == i*(m-j) + j*(n-i):
                print("Yes")
                exit()
    print("No")



if __name__ == '__main__':
    solve()

Solution (Python):
n,m,k=map(int,input().split())
flg=0
for i in range(n):
  tmp=k-m*i
  if n==i*2 or tmp<0:
    pass
  elif tmp%(n-i*2)==0 and 0<=tmp//(n-i*2)<=m:
    flg=1
if flg==1:
  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*n-2*i*j==k:
      print("Yes")
      break
  else:
    continue
  break
else:
  print("No")

Solution (Python):
def resolve():
    n, m, k = map(int, input().split())
    for x in range(n + 1):
        for y in range(m + 1):
            met = y * (n - x) + x * (m - y)
            if met == k:
                print('Yes')
                return

    print('No')
resolve()

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

Solution (Python):
import sys
import itertools

import time
import math
import heapq
from collections import defaultdict
from collections import Counter
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines



import sys
import itertools

import time
import math
import heapq
from collections import defaultdict
from collections import Counter
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines



N, M, K = map(int, input().split())
ok = False
for i in range(N + 1):
    
    for j in range(M + 1):
        now = i * (M - j) + (N - i) * j
        if now == K:
            ok = True
        
        
        
        
if ok:
    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):
        black = i * m - (j * i) + (n - i) * j
        if black == k:
            print("Yes")
            exit()
print("No")

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

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

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

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

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

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

if k==0:
    print("Yes")
    sys.exit()

for i in range(n+1):
    black=i*m
    c=n-(2*i)
    for j in range(m+1):
        if black+(j*c)==k:
            print("Yes")
            sys.exit()

print("No")

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

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, M, K = LI()

    ans = 'No'
    for i, j in itertools.product(range(N + 1), range(M + 1)):
        if i * j + (N - i) * (M - j) == K:
            ans = 'Yes'
            break

    print(ans)

if __name__ == '__main__':
    resolve()

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

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

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

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

Solution (Python):





import math
import fractions
import sys
import bisect
import heapq  
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr



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



def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


inf = 10 ** 18
mod = 10 ** 9 + 7

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

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

Solution (Python):
N,M,K=map(int,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):
import sys
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')
            sys.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):
        cnt=i*j+(N-i)*(M-j)
        if cnt==K:
            ans="Yes"
            break

print(ans)

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

for j in range(M + 1):
    for i in range(N + 1):
        t = i * j + (N - i) * (M - j)
        area = M * N - t
        
        if area == K:
            flag = True

if flag:
    print('Yes')
else:
    print("No")

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

for j in range(M + 1):
    for i in range(N + 1):
        
        
        area = (M - j) * i + (N - i) * j
        if area == K:
            flag = True

if flag:
    print('Yes')
else:
    print("No")

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

    for i in range(0, N+1):
        for j in range(0, M+1):

            if i*(M-j) + j*(N-i) == K:
                print("Yes")
                return

    print("No")

solve()

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

judge=False
for i in range(N+1):
  for j in range(M+1):
    if i*j+(N-i)*(M-j)==K:
      judge=True
      
if judge:
  print("Yes")
else:
  print("No")

Solution (Python):
import math
N,M,K = map(int,input().split())
list = [0 for i in range(N*M+1)]
i = 0
while i <= M:
    k=0
    list[N*i]=1
    while k < N:
        list[N*i+(M-2*i)*k]=1
        k+=1
    i+=1
j = 0
while j <= N:
    l = 0
    list[M*j]=1
    while l < M:
        list[M*j+(N-2*j)*l]=1
        l+=1
    j+=1
if list[K] ==1:
    print("Yes")
else:
    print("No")

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

for x in range(N+1):
    for y in range(M+1):
        F|=(x*(M-y)+y*(N-x)==K)

if F:
    print("Yes")
else:
    print("No")