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):
h, w, k = map(int, input().split())
for r in range(h + 1):
    for c in range(w + 1):
        s = (h - r) * c + r * (w - c)
        if s == k:
            print('Yes')
            exit()
print('No')

Solution (Python):
import sys

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

for a in range(n):
	if n-2*a == 0:
		continue
	b = ((k-a*m))/(n-2*a)
	if (b >= 0) and (b <= m) and (b%1 == 0):
		print("Yes")
		sys.exit()

print("No")

Solution (Python):
def main():
    N, M, K = (int(i) for i in input().split())
    ans = set()
    for i in range(M+1):
        for j in range(N+1):
            if N-j >= 0 and M-i >= 0:
                ans.add((N-j)*i + (M-i)*j)
    if K in ans:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

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

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

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

def black(x,y):
  return x*y+(n-x)*(m-y)

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

Solution (Python):
N,M,K = map(int,input().split())
ans = 'No'
for x in range(M+1):
    if M-2*x == 0:
        if K%N == 0:
            ans = 'Yes'
            break
        else:
            continue
    else:
        if (K-N*x)%(M-2*x) == 0 and 0 <= (K-N*x)/(M-2*x) <= N:
            ans = 'Yes'
            break
        else:
            continue
print(ans)

Solution (Python):
N,M,K = map(int,input().split())
ans = 'No'
flag = False
for x in range(M+1):
    if flag:
        break
    for y in range(N+1):
        if (N-y)*x+(M-x)*y == K:
            ans = 'Yes'
            flag = True
            break
print(ans)

Solution (Python):
import math
import bisect
import collections
import itertools
import heapq
import sys
sys.setrecursionlimit(10**9)
def gcd(a,b):return math.gcd 
def lcm(a,b):return (a*b) // math.gcd(a,b) 
def iin(): return int(input()) 
def isn(): return input().split() 
def imn(): return map(int, input().split()) 
def iln(): return list(map(int, input().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def comb(l, n): return itertools.combinations(l, n) 
def 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)
    return divisors
def is_prime(n):
    if n == 1: return False
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0: return False 
    return True
def primes(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n + 1, i): is_prime[j] = False
    return [i for i in range(n+1) if is_prime[i]]
def sieve_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

N,M,K = imn()

for i in range(N+1):
    for j in range(M+1):
        b_cnt = (i*M)+(j*N)-(2*i*j)
        if b_cnt == K:
            print('Yes')
            break
    else:
        continue
    break
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")
      exit()
print("No")

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

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

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

able_set = set()
for ni in range(n+1):
  base = ni * m
  for mi in range(m+1):
    black = base - ni*mi + (n-ni)*mi    
    able_set.add(black)    
    
if k in able_set:
  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 j*n+i*m-2*i*j==k:
      print('Yes')
      exit()
print('No')

Solution (Python):






n, m, k = map(int, input().split())
if n == 1 or m == 1:
    print("Yes")
    exit()
if (n == 2 or m == 2) and k % 2 == 0:
    print("Yes")
    exit()
if k % n == 0 or k % m == 0:
    print("Yes")
    exit()
for y in range(1, n):
    for x in range(1, m):
        
        
        if k == (y * m - x * y) + x * (n - y):
            
            
            print("Yes")
            exit()
print("No")

Solution (Python):
import sys

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

"""

それぞれA,B回押すとすると
A*(N-B) + B*(M-A) == K

AはM以下
.
.



"""

for A in range(M+1):

    for B in range(N+1):

        if A*(N-B) + B*(M-A) == 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*j+(n-i)*(m-j)==k:
      print("Yes")
      exit(0)
else:
  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):
        black = N*j + M*i - i*j*2
        if K == black:
            flag = True
            break

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

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

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

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

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

if ans:
    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 (m*i + n*j - 2*i*j) == k:
            print('Yes')
            quit()
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 -2*n*m == 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):
n, m, k = map(int, input().split())
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
input = sys.stdin.readline
N, M, K = map(int, input().split())
dp = [[0] * (M + 1) for _ in range(N + 1)]
for i in range(N + 1):
  for j in range(M + 1):
    dp[i][j] = i * M + j * N - 2 * i * j
    if dp[i][j] == K:
      print("Yes")
      exit(0)
print("No")

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


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*N - 2*min(i, j)*max(i, j) == K:
                print("Yes")
                return
    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 i*(m-j)+j*(n-i) == k:
            print("Yes")
            exit()
print("No")

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

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

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  

N, M, K = rl()

bool = [False] * (N * M + 1)
for i in range(N+1):
    bool[i*M] = True
    for j in range(1, M+1):
        x = N - (2 * i)
        if 0 <= i*M + x*j <= N * M:
            bool[i*M + x*j] = True

print('Yes' if bool[K] else 'No')

Solution (Python):
N,M,K = map(int,input().split())
flag = 0
if (N*M)%2==0 and K==(N*M)//2:
    flag = 1
else:
    y = 0
    while y<=N:
        if N-2*y!=0 and (K-M*y)%(N-2*y)==0 and M>=(K-M*y)//(N-2*y)>=0:
            flag = 1
            break
        y += 1
if flag==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 and j:
            ans = i * m + j * n - (i * j * 2)
        elif i > 0 and j == 0:
            ans = i * m
        elif i == 0 and j > 0:
            ans = j * n
        else:
            ans = 0
        if ans == k:
            print('Yes')
            exit()

print('No')

Solution (Python):

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

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

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

Solution (Python):
def nm(n, m, k):
    for i in range(n+1):
        for j in range(m+1):
            black = (n - i) * j + (m - j) * i
            if black == k:
                return "Yes"
    return "No"


if __name__ == "__main__":
    n, m, k = map(int, input().split())
    ans = nm(n, m, k)
    print(ans)

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):
def examB():
    N, M, K = LI()
    ans = "No"
    for i in range(N+1):
        for j in range(M+1):
            cur = M*i + N*j - i*j*2

            if cur==K:
                ans = "Yes"
                break
    print(ans)

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examB()

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

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

print('No')

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

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

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

if K % M == 0 or K % N == 0:
    print('Yes')
    exit()

for i in range(N + 1):
    k = K - M * i
    n = N - 2 * i
    if n <= 0 or k < 0:
        continue
    if k % n == 0:
        if 0 <= k // n <= M:
            print('Yes')
            exit()
else:
    print('No')

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

if __name__ == "__main__":
    main()

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

ok = False
for n in range(N+1):
    for m in range(M+1):
        if n*m + (N-n)*(M-m) == K:
            ok = True

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

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

Solution (Python):
N,M,K=map(int,input().split())
for k in range(0,N+1):
    for l in range(0,M+1):
        tmp=(M-l)*k+(N-k)*l
        if tmp==K:
            print("Yes")
            exit()

print("No")

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

set_ = set([])
for i in range(n+1):
    for j in range(m+1):
        set_.add(i*j + (n-i)*(m-j))
if k in set_:
    print("Yes")
else:
    print("No")

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

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

flg=False
for x in range(N+1):
    for y in range(M+1):
        temp = (N-x)*(M-y) + (x*y)
        if K==temp:
            flg=True
            break
if flg:
    print("Yes")
else:
    print("No")

Solution (Python):
N,M,K=map(int,input().split())
l=[i*j+(N-i)*(M-j) for i in range(N+1) for j in range(M+1)]
print('Yes' if K in l else '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*m-2*i*j==k:
            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):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    n, m, k = map(int, input().split())

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


if __name__ == '__main__':
    main()

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

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

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

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

flag = False

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

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

Solution (Python):

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

H, W, K = map(int, input().split())
Upper = H//2 if H % 2 == 0 else H//2+1
for h in range(Upper):
    w = (K-W*h)/(H-2*h)
    if int(w) == w and 0 <= w <= W:
        print("Yes")
        exit()
print("No")

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

H, W, K = map(int, input().split())
for h in range(H+1):
    for w in range(W+1):
        if (W-w)*h+(H-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):
        if i * (m - j) + j * (n - i) == k:
            print("Yes")
            exit()
print("No")

Solution (Python):
n, m, k = map(int, input().split())
set_num = set([])
for n_i in range(n + 1):
    for m_i in range(m + 1):
        set_num.add((n_i * m) + (m_i * n) - ((n_i * m_i) * 2))
if k in set_num:
    print("Yes")
else:
    print("No")

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

for n in range(0,N+1):
    for m in range(0,M+1):
        a=n*M+m*N-n*m*2
        if a not in lst:
            lst.add(a)
print("Yes" if K in lst else "No")

Solution (Python):
N, M, K = map(int, input().split())
for ic in range(N+1):
  for ir in range(M+1):
    if(N*ir+M*ic-2*ic*ir == 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:
            break
    else:
        continue
    break
else:
    print('No')
    exit()
print('Yes')

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

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


for a in range(M + 1):
  for b in range(N + 1):
    if a * N + b * M - 2 * a * b == 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 = n*j + m *i - 2*j*i
    if k == black:
      print('Yes')
      exit(0)
print('No')

Solution (Python):
n,m,b = map(int,input().split())
for i in range(n+1):
  for j in range(m+1):
    tmp = i * m + j * n - i * j * 2
    if tmp == b:
      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):
from sys import stdin
N,M,K = [int(x) for x in stdin.readline().rstrip().split()]
flag = False
for a in range(N+1):
    for b in range(M+1):
        if (N-a)*b + (M-b)*a == K:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
from collections import Counter,defaultdict,deque
import sys,bisect,math,itertools,string,queue
from heapq import heappop, heappush
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

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

for y in range(N+1):
    for t in range(M+1):
        if t*(N-y)+y*(M-t)==K:
            print "Yes"
            quit()
else:
    print "No"

Solution (Python):
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

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

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

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

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

canMake = set()
for i in range(N + 1):
    for j in range(M + 1):
        area = (N - i) * (M - j) + i * j
        canMake.add(area)

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

Solution (Python):
X, Y, K = map(int, input().split())

for Xi in range(0, X+1):
    for Yi in range(0, Y+1):
        if Yi * (X-Xi) + Xi * (Y-Yi) == K:
            print("Yes")
            exit()
print("No")

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

Solution (Python):






import math
import statistics
import numpy as np
import queue

n,m,k = 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(0)
print('No')

Solution (Python):
n,m,k = map(int,input().split())
a = set()
for i in range(n+1):
  for j in range(m+1):
    a.add(m*i+n*j-i*j*2)
print('YNeos'[k not in a::2])

Solution (Python):
def main():
    N, M, K = (int(i) for i in input().split())
    for n in range(N+1):
        for m in range(M+1):
            if m * (N - n) + (M - m) * n == K:
                return print("Yes")
    print("No")

if __name__ == '__main__':
    main()

Solution (Python):
from itertools import permutations
from sys import exit, stdin
N, M, K = [int(_) for _ in stdin.readline().rstrip().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())

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

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

sum = 0

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

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

Solution (Python):
if __name__ == "__main__":
    N, M, K = map(int, input().split())

    for k in range(0, N + 1):
        for l in range(0, M + 1):
            b = k * (M - l) + (N - k) * l
            if b == 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):
        colors = i*m
        colors += j*(n-i)
        colors -= i*j
        if colors == k:
            print("Yes")
            exit()
print("No")

Solution (Python):
N,M,K = [int(i) for i in raw_input().split()]
 
OK = False
 
for a in range(N+1):
    for b in range(M+1):
        if(a*(M-b) + b*(N-a)==K):OK =True
 
 
if(OK):print("Yes")
else:print("No")

Solution (Python):

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

l = []

for i in range(n+1):
    for j in range(m+1):
        tmp = i*j + (n-i)*(m-j)
        l.append(tmp)

l = list(set(l))
l.sort()

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

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


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

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

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

for x in range(n + 1):
    for y in range(m + 1):
        black = x * (m - y) + y * (n - x)
        if black == k:
            print('Yes')
            exit(0)
print('No')

Solution (Python):
N,M,K=map(int,input().split())
ans="No"
for x in range(N+1):
  a=K-x*M
  b=N-2*x
  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 n in range(0,N+1):
  for m in range(0,M+1):
    if n*M+m*N-2*n*m==K:
      print("Yes")
      exit(0)
print("No")

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

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

print("No")

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

if N * M == K:
    print('Yes')
    exit()

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

print('No')

Solution (Python):
N,M,k=map(int,input().split())
for i in range(N+1):
    for j in range(M+1):
        tmp=N*j+M*i-2*i*j
        if tmp==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):
            count = M*i + N*j-2*i*j 
            if count == K:
                return "Yes"

    return "No"

if __name__ == '__main__':
    print(main())

Solution (Python):
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)

from math import factorial
import heapq, bisect
import math
import itertools


import queue
from collections import deque


def main():
    high, width, k = map(int, input().split())

    for i in range(high + 1):
        for j in range(width + 1):
            now_b = i * (width - j) + j * (high - i)
            if now_b == k:
                print('Yes')
                sys.exit()
    print('No')









if __name__ == '__main__':
    main()

Solution (Python):
N, M, K = map(int, input().split())
s = set()
for i in range(N+1):
  for j in range(M+1):
    r = i*(M-j)+(N-i)*j
    s.add(r)
if K in s:
  print("Yes")
else:
  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)+j*(n-i)==k:
            flag=1
            break
if flag:print("Yes")
else:print("No")

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

Solution (Python):
n, m, k = [ int(v) for v in 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"
            break
print(ans)

Solution (Python):
N,M,K=map(int,input().split());print(" YNeos"[K in[i*j+(N-i)*(M-j)for i in range(N+1)for j in range(M+1)]::2])

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

Solution (Python):
N,M,K = map(int, input().split())
field = [[0]*M for i in range(N)]
def reverse(x):
    if x == 0:
        return 1
    else:
        return 0
now = 0
for i in range(N+1):
    if N - 2 * i ==0:
        for j in range(M):
           now += M
    elif (K - now) % (N - 2 * i) == 0 and (K - now) / (N - 2 * i) <= M and  (K - now) / (N - 2 * i) >= 0:
        print("Yes")
        exit(0)
    elif i == N:
        print("No")
        exit(0)
    else:
        now += M

Solution (Python):
n, m, k = map(int, input().split())
import sys
if n == 1 or m == 1:
    print('Yes')
    sys.exit()
if k%m == 0 or k%n==0:
    print('Yes')
    sys.exit()
for i in range(1,m):
    for j in range(1,n):
        if k == i*n + j*m - 2*i*j:
            print('Yes')
            sys.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):
        temp = i*m + j*n -2*i*j
        if temp == k:
            
            flag = True
            break
    if flag:
        break

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

Solution (Python):

def main():
    N, M, K = tuple(map(int, input().split()))
    cand = {i * (M - j) + j * (N - i) for i in range(N + 1) for j in range(M + 1)}
    flg = K in cand
    print("Yes" if flg else "No")


if __name__ == "__main__":
    main()

Solution (Python):

def main():
    N, M, K = tuple(map(int, input().split()))
    cand = [i * (M - j) + j * (N - i) for i in range(N + 1) for j in range(M + 1)]
    flg = K in cand
    print("Yes" if flg else "No")


if __name__ == "__main__":
    main()

Solution (Python):



import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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