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



Sample input:
2 2 2


Sample output:
Yes

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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(sum,"_",a,"_",b)
      print("Yes")
      exit()
 
print("No") #Yesが出ない時に出力

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
#%%
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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())

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
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()

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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:
            # print(temp,i,j)
            flag = True
            break
    if flag:
        break

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

Submission status: Accepted

Solution code:
# code-festival-2017-qualaB - fLIP
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()

Submission status: Accepted

Solution code:
# code-festival-2017-qualaB - fLIP
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()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#CODEFESTIVAL2017qualA B

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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N, M, K = [int(i) for i in input().split()]
    for k in range(N + 1):
        for l in range(M + 1):
            if k * (M - l) + (N - k) * l == K:
                return True
    return False

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

Submission status: Accepted

Solution code:
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 True
    return False
                
print("Yes" if solve() else "No")

Submission status: Accepted

Solution code:
H,W,k=map(int,input().split());x="No"
for h in range(H+1):
  for w in range(W+1):
    if h*w+(H-h)*(W-w)==k:
      x="Yes"
      break
  if x=="Yes":break
print(x)

Submission status: Accepted

Solution code:
#### import ####
import sys
sys.setrecursionlimit(10**7)
import math
from collections import defaultdict

#### 定数 ####
mod = 10**9 + 7

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))

#################

N,M,K = II()
val = N*M-K
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'
      break
print(ans)

Submission status: Accepted

Solution code:
def solve(w, h, k):
    for y in range(h+1):
        if h == 2*y:
            continue
        x = (k - y*w) // (h - 2*y)
        if not (0 <= x <= w):
            continue
        s = x * (h-y) + (w-x) * y
        if s == k:
            return "Yes"
    return "No"

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

Submission status: Accepted

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

for i in range(m+1):
    a = k - i * n
    b = m - 2 * i
    if b != 0 and a % b == 0 and 0 <= a // b <= n:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

Solution code:
n,m,k = 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')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
N, M, K = map(int,input().split())
V = []
for i in range(N+1):
    for j in range(M+1):
        V.append(M*i + (N-2*i)*j)

if K in V:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
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")
            import sys
            sys.exit()
print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# code-festival-2017-qualaB - fLIP
def main():
    n, m, k = list(map(int, input().rstrip().split()))
    for i in range(n + 1):
        for j in range(m + 1):
            if i * (m - j) + j * (n - i) == k:
                print("Yes")
                return
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N,M,K = [int(x) for x in input().split()]
flag = False
for y in range(N+1):
    if(N-2*y==0):
        continue
    x = (K-M*y)/(N-2*y)
    if(int(x)==x and 0<=x<=M):
        flag = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

flag = False
for y in range((n+1)//2+1):
    for x in range((m+1)//2+1):
        a = x*y + (m-x)*(n-y)
        b = n*m - a
        if k in [a, b]:
            flag = True
            break
    if flag:
        break

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

Submission status: Accepted

Solution code:
from itertools import product

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

Submission status: Accepted

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

bl = False
for n in range(N+1):
  x = n*M
  if x == K:
    bl = True
    break
  # 1列いじると(N-2n)
  d = N - 2 * n
  if d == 0:
    continue
  if (K-x) % d:
    continue
  m = (K - x) // d
  if 0 <= m <= M:
    bl = True
    break

answer = 'Yes' if bl else 'No'
print(answer)

Submission status: Accepted

Solution code:
n, m, K = map(int, input().split())
for k in range(n + 1):
    if n - 2 * k != 0 and (K - k * m) % (n - 2 * k) == 0 and 0 <= (K - k * m) / (n - 2 * k) <= m:
        print('Yes')
        exit(0)
else:
    print('No')

Submission status: Accepted

Solution code:
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*2)==k:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
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")
            quit()
print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
B - fLIP
https://atcoder.jp/contests/code-festival-2017-quala/tasks/code_festival_2017_quala_b

"""
import sys


def solve(N, M, K):
    if K%N == 0 or K%M == 0:
        return 'Yes'
    for y in range(N+1):
        for x in range(M+1):
            if x * y + (N - y) * (M - x) == K:
                return 'Yes'
    return 'No'


def main(args):
    N, M, K = map(int, input().split())
    ans = solve(N, M, K)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m,k = map(int,input().split())
p = abs(2*k-n*m)

a = n
while a>0:
  if p%a == 0 and p//a <= m and (p//a)%2 == m%2:
    print("Yes")
    quit()
  elif p > a*m:
    break  
  a -= 2
print("No")

Submission status: Accepted

Solution code:
n,m,k = map(int, input().split())
def check():
    globals()
    for i in range(n+1):
        for j in range(m+1):
            if j*(n-i)+i*(m-j)==k:
                return True
    return False
if check():
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
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-i)*j==k:
      flag=1
print("Yes" if flag==1 else "No")

Submission status: Accepted

Solution code:
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-i)*j == K:
            flag=1
            print("Yes")
            break
    if flag==1:
        break
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,M,K=map(int,input().split())
ans=False
for a in range(N+1):
    for b in range(M+1):
        if K==a*b+(N-a)*(M-b):
            ans=True
            break
    if ans:break
if ans:print("Yes")
else:print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W,K = map(int,input().split())

ans = "No"

for i in range(H+1):
    if H-2*i == 0:
        if K-W*i == 0:
            ans = "Yes"
        else:
            continue
    if (K-W*i) % (H-2*i) != 0:
        continue
    j = (K-W*i) // (H-2*i)
    if 0 <= j <= W:
        ans = "Yes"
        break

print(ans)

Submission status: Accepted

Solution code:
H,W,K = map(int,input().split())

ans = "No"

for i in range(H+1):
    for j in range(W+1):
        if H*j + W*i - 2*i*j == K:
            ans = "Yes"
            break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def n_black(n, m):
    return (N - n) * m + (M - m) * n

ans = False
for i in range(N + 1):
    for j in range(M + 1):
        if n_black(i, j) == K:
            ans = True

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
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 i*(M-j)+j*(N-i)==K:
            Yes()
            exit()
No()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, m, k = map(int, input().split())
is_black = False

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import product

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

for i, j in product(range(N+1), range(M+1)):
    S.add((M-j)*i + (N-i)*j)

print("Yes" if K in S else "No")

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split());print('YNeos'[all(k!=(b-j)*i+j*(a-i)for i in range(a+1)for j in range(b+1))::2])

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split());print("NYoe s"[1in[k==(b-t)*s+t*(a-s)for t in range(b+1)for s in range(a+1)]::2])

Submission status: Accepted

Solution code:
a,b,k=map(int,input().split())
for s in range(a+1):
    for t in range(b+1):
        if k==(b-t)*s+(a-s)*t:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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

Submission status: Accepted

Solution code:
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")
      break
  else:
    continue
  break
else:
  print("No")

Submission status: Accepted

Solution code:
#button = i*m + j*(n-2*i) = k
n,m,k = map(int, input().split())
for i in range(n+1):
  if 2*i == n:
    if i*m == k:
      print("Yes")
      break
  else:
    t = k-i*m
    s = n-2*i
    if t%s==0 and 0<=t//s<=m:
      print("Yes")
      break
else:
  print("No")

Submission status: Accepted

Solution code:
N,M,K=map(int,input().split(' '))
print('Yes') if K in [(N-a)*b+(M-b)*a for a in range(N+1) for b in range(M+1)] else print('No')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
N,M,K = map(int,input().split())
ansx = -1
ansy = -1
for k in range(N+1):
  for l in range(M+1):
    if k*(M-l)+l*(N-k) == K:
      ansx = k
      ansy = l
if ansx == -1 and ansy == -1:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
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)+j*(n-i)==k:
      f=True
if f:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
n, m, k = map(int, input().split())
gyoli = []
for i in range(n + 1):
  gyoli.append(i)
candiset = set()
for j in range(m + 1):
  for gyo in gyoli:
    candiset.add(gyo*j + (n-gyo)*(m-j))
if k in candiset:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n,m,k = (int(i) for i in 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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def LIR(n): return [LI() for i in range(n)]

#A
"""
s = S()
if s[0] != "A":
    print("WA")
else:
    count = []
    for i in range(2,len(s)-1):
        if s[i] == "C": count.append(i)
    if len(count) != 1:
        print("WA")
    else:
        for i in range(1,len(s)):
            if i not in count:
                if s[i] == s[i].upper():
                    print("WA")
                    quit()
        print("AC")
"""

#B
n,m,k = LI()
for i in range((n+1)//2):
    if (k - m*i) % (n - 2*i) == 0 and (k-m*i)//(n-2*i) >= 0 and (k-m*i)//(n-2*i) <= m:
        print("Yes")
        quit()
print("No")

#C

#D

#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n,m,k = li()

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,m,k = map(int,input().split())
for a in range(n+1):
    # a行押す
    black = a * m
    for b in range(m+1):
        # b列押す
        res = black + b * (n - 2 * a)
        if res == k:
            print('Yes')
            exit()
print('No')

Submission status: Accepted

Solution code:
import itertools
N, M, K = [int(_) for _ in input().split()]
for i, j in itertools.product(range(N+1), range(M+1)):
    if (N-i)*j+i*(M-j) == K:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M, K = map(int, input().split())
"""
N=3, M=5

xxxxx
xxxxx
xxxxx
"""

def check(KS):
  for i in range(N+1):
    # (i * M) + (j * (N-2i)) == K のjが存在する。0,Mの整数として。
    # 全探索よりもjを整数として求めて頑張ればオーダN
    if N == 2*i:
      if i*M == KS:
        print("Yes")
        exit(0)
      else:
        continue
    if (KS - i*M) % (N-2*i) == 0 :
      sho = (KS - i*M) // (N-2*i)
      if 0 <= sho and sho <= M:
        print('Yes')
        exit(0)

check(K)
#N,M = M,N
#check(K)

print('No')

Submission status: Accepted

Solution code:
N,M,K = map(int,input().split())
A = []

for y in range(1,N+1) :
    for x in range(1,M+1) :
        a = y*x + (N-y)*(M-x)
        A.append(a)
        A.append(N*M-a)
if K in A :
    print("Yes")
else :
    print("No")
#print(sorted(list(set(A))))

Submission status: Accepted

Solution code:
N, M, K = map(int,input().split())
if K%N==0 or K%M==0:
    print("Yes")
    exit()

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M, K = list(map(int, input().split()))
L = [0 for i in range(N * M + 1)]
L[0] = 1

for x in range(M + 1):
	for y in range(N + 1):
		L[x * (N - y) + y * (M - x)] += 1

if L[K] >= 1: 
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
P = input().split()
N = int(P[0])
M = int(P[1])
K = int(P[2])


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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