ZhenlongDai/ACPR huggingface dataset:
Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):



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


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):



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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k = map(int,input().split())
flg = False
for i in range(n + 1):
    for j in range(m + 1):
        if i * (n - j) + j * (m - i) == k:
            flg = True
            break
        else:
            pass
print(flg)
if flg:
    print("Yes")
else:
    print("No")

Failing test case input:
7 17 1

Expected output:
No


Actual output:
False
No


Fixed submission (verdict: Accepted):
n,m,k = map(int,input().split())
flg = False
for i in range(n + 1):
    for j in range(m + 1):
        if m*i + n*j - i*j*2 == k:
            flg=True
if flg:
    print('Yes')
else:
    print("No")
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions

import copy





sys.setrecursionlimit(10000001)
INF = sys.maxsize
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))




def main():
    n, m, k = ns()

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

    print("NO")


if __name__ == '__main__':
    main()


Failing test case input:
7 17 1

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions

import copy





sys.setrecursionlimit(10000001)
INF = sys.maxsize
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))




def main():
    n, m, k = ns()

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

    print("No")


if __name__ == '__main__':
    main()

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, K = map(int, input().split())

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


Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())

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

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,M,K=list(map(int, input().split()))

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

print(sea())

Failing test case input:
0 3 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N,M,K=list(map(int, input().split()))

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

print(sea())

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n ,m ,k = map(int,input().split())

sum = 0

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

   
      

Failing test case input:
1 13 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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")
Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m, k = list(map(int, input().split()))

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

Failing test case input:
0 12 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n, m, k = list(map(int, input().split()))

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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def calc(n, m, b_n, b_m):
	return m * b_n + n * b_m - b_n * b_m * 2

def sub():
	n, m, k = list(map(int, input().split()))
	for i1 in range(n):
		for i2 in range(m):
			if calc(n, m, i1 + 1, i2 + 1) == k:
				return "Yes"
	return "No"

def main():
	print(sub())

if __name__ == '__main__':
	main()

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

def calc(n, m, b_n, b_m):
	return m * b_n + n * b_m - b_n * b_m * 2

def sub():
	n, m, k = list(map(int, input().split()))
	for i1 in range(n + 1):
		for i2 in range(m + 1):
			if calc(n, m, i1, i2) == k:
				return "Yes"
	return "No"

def main():
	print(sub())

if __name__ == '__main__':
	main()

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,K = map(int,input().split())
ans = "No"

for k in range(1,n+1):
    for l in range(1,m+1):
        if k*(m-l)+(n-k)*l == K: 
            ans = "Yes"  
            break

print(ans)

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,K = map(int,input().split())
ans = "No"

for k in range(0,n+1):
    for l in range(0,m+1):
        if k*(m-l)+(n-k)*l == K: 
            ans = "Yes"  
            break

print(ans)

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
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 == K:
            print('Yes')
            sys.exit()
print('No')

Failing test case input:
3 3 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
N, M, K = map(int, 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')
            sys.exit()
print('No')
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, k = map(int, input().split())
exists = False
for i in range(n):
  for j in range(m):
    if (i + 1) * m + (j + 1) * n - (i + 1) * (j + 1) == k:
      exists = True
      break
  if exists:
    break
print('Yes' if exists else 'No')

Failing test case input:
3 5 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n, m, k = map(int, input().split())
exists = False
for i in range(n + 1):
  for j in range(m + 1):
    if i * m + j * n - 2 * i * j == k:
      exists = True
      break
  if exists:
    break
print('Yes' if exists else 'No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())
for i in range(n):
  for j in range(m):
    if i*m+j*n-i==k:
      print('Yes')
      quit()
print('No')

Failing test case input:
3 3 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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')
      quit()
print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, K = [int(i) for i in input().split()]

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

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M, K = [int(i) for i in input().split()]
for m in range(M+1):
    for n in range(N+1):
        if  (M - m) * n + (N - n) * m == K:
            print('Yes')
            exit()
print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    
    N, M, K = map(int, input().split())

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

    print("No")


if __name__ == '__main__':
    main()


Failing test case input:
0 3 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def main():
    N, M, K = map(int, input().split())

    editorial(N, M, K)

def editorial(N, M, K):
    for k in range(N+1):
        for l in range(M+1):
            
            
            x = k * (M - l) + (N - k) * l
            if x == K:
                print("Yes")
                return

    print("No")

    
if __name__ == '__main__':
    main()

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
3 5 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
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")
Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k = map(int, input().split())

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

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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 j*(n-i) + i*(m-j) == k:
            print("Yes")
            exit()
print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K= (int(i) for i in input().split())  
ok=0

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

       ok=1

if ok==0:
 print("No")
else:
 print("Yes")

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M,K= (int(i) for i in input().split())  
ok=0

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

       ok=1

if ok==0:
 print("No")
else:
 print("Yes")

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k=[int(i) for i in input().split()]
for i in range(n):
    for j in range(m):
        if i*(n-j)+j*(m-i)==k:
            print("Yes")
            break
else:
    print("No")

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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()

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K = [int(i) for i in input().split()]

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

print("No")

Failing test case input:
7 9 8

Expected output:
No


Actual output:
0 0 0
0 1 7
0 2 14
0 3 21
0 4 28
0 5 35
0 6 42
0 7 49
0 8 56
0 9 63
1 0 9
1 1 14
1 2 19
1 3 24
1 4 29
1 5 34
1 6 39
1 7 44
1 8 49
1 9 54
2 0 18
2 1 21
2 2 24
2 3 27
2 4 30
2 5 33
2 6 36
2 7 39
2 8 42
2 9 45
3 0 27
3 1 28
3 2 29
3 3 30
3 4 31
3 5 32
3 6 33
3 7 34
3 8 35
3 9 36
4 0 36
4 1 35
4 2 34
4 3 33
4 4 32
4 5 31
4 6 30
4 7 29
4 8 28
4 9 27
5 0 45
5 1 42
5 2 39
5 3 36
5 4 33
5 5 30
5 6 27
5 7 24
5 8 21
5 9 18
6 0 54
6 1 49
6 2 44
6 3 39
6 4 34
6 5 29
6 6 24
6 7 19
6 8 14
6 9 9
7 0 63
7 1 56
7 2 49
7 3 42
7 4 35
7 5 28
7 6 21
7 7 14
7 8 7
7 9 0
No


Fixed submission (verdict: Accepted):
N,M,K = [int(i) for i in input().split()]

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

print("No")
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
for i in range(a+1):
    for m in range(b+1):
        if i*(a - m) + (b - i) * m == c:
            print("Yes")
            exit()
print("No")

Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
for i in range(a+1):
    for m in range(b+1):
        if (a - i)*(b - m) + i * m == c:
            print("Yes")
            exit()
print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
nums = [int(x) for x in input().split()]
N,M,K = nums[0],nums[1],nums[2]

for k in range(N):
	for l in range(M):
		if k * (M - l) + l * (N-k) == K:
			print("Yes")
			exit(0)
print("No")

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
nums = [int(x) for x in input().split()]
N,M,K = nums[0],nums[1],nums[2]
 
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")

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def myAnswer(N: int, M: int, K: int) -> int:
   ans = set([0])
   for i in range(M):
      ans.add(N * (i + 1))
      ans.add(M - (i + 1) + (N - 1) * (i + 1))
   for i in range(N):
      ans.add(M * (i + 1))
      ans.add(N - (i + 1) + (M - 1) * (i + 1))
   print(ans)
   return "Yes" if K in ans else "No"

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


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):



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

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

Problem: p03592
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
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 - h*w == K:
      print('Yes')
      exit()
print('No')


Failing test case input:
8 5 12

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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')
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N, M, K = map(int, input().split())

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

main()


Failing test case input:
1 13 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def main():
    N, M, K = map(int, input().split())

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

main()

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K = [int(i) for i in input().split()]

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

Failing test case input:
8 5 12

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N,M,K = [int(i) for i in input().split()]

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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n , m , k = map(int,input().split())
for i in range(m+1):
    for j in range(n+1):
        if i*(m-j) + j*(n-i) == k:
            print("Yes")
            exit()
print("No")

Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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


if __name__ == "__main__":
    main()

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

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()
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
D = [int(_) for _ in input().split()]

def solve(D):
    N = D[0]
    M = D[1]
    K = D[2]
    
    for l in range(N):
        for k in range(M):
            if M * k + N *l - 2 * k * l == K:
                return "Yes"

    return "No"

print(solve(D))

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
D = [int(_) for _ in input().split()]

def solve(D):
    N = D[0]
    M = D[1]
    K = D[2]
    
    for i in range(N+1):
        for j in range(M+1):
            if (i*(M-j) + (N-i)*j) == K:
                return "Yes"

    return "No"

print(solve(D))

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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):
        for l in range(M):
            if k*(M-l)+(N-k)*l == K:
                print('Yes')
                return

    print('No')


if __name__ == "__main__":
    main()

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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()

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, K = map(int, input().split())
ans = 0
for i in range(1, N + 1):
    for j in range(1, M + 1):
        if K == N * j + M * i - 2 * i * j:
            ans = 1
            break
if ans == 0:
    print("No")
else:
    print("Yes")


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())
ans = -1
for i in range(N + 1):
    for j in range(M + 1):
        if K == M * i + N * j - i * j * 2:
            ans = 1
            break
if ans == 1:
    print("Yes")
else:
    print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K = list(map(int,input().split()))
for i in range(1,N+1):
    for j in range(1,M+1):
        if (N-i)*j+(M-j)*i == K:
            print('Yes')
            exit()
print('No')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M,K = list(map(int,input().split()))
for i in range(0,N+1):
    for j in range(0,M+1):
        if (N-i)*j+(M-j)*i == K:
            print('Yes')
            exit()
print('No')
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K=map(int,input().split());print(" YNeos"[K in[i*j+(N-i)*(M-j)for i in range(N)for j in range(M)]::2])

Failing test case input:
7 17 0

Expected output:
Yes


Actual output:
 No


Fixed submission (verdict: Accepted):
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])

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
N,M,K = map(int, input().split())

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

print('No')


Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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 - 2 * i * j == K:
            print('Yes')
            sys.exit()

print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int,input().split())
for i in range(a+1):
    for m in range(b+1):
        if b * i + a * m == c:
            print("Yes")
            exit()
print("No")

Failing test case input:
7 5 12

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c = map(int,input().split())
for i in range(a+1):
    for m in range(b+1):
        if (a - i)*(b - m) + i * m == c:
            print("Yes")
            exit()
print("No")

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,M,K=list(map(int, input().split()))

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

Failing test case input:
0 17 7

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N,M,K=list(map(int, input().split()))

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

print(sea())

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K=map(int,input().split())
flag=False

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

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M,K=map(int,input().split())
flag=False

for i in range(N+1):
    for j in range(M+1):
        black= (N-i)*j + (M-j)*i
        if K==black:
            flag=True
            break
    if flag:
        break
       
if flag:
    print("Yes")
else:
    print("No")
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())
for i in range(n):
    for j in range(m):
        if k==i*(m-j)+j*(n-i):
            print('Yes')
            exit()
print('No')


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve():
    N, M, K = list(map(int, input().split(" ")))
    for i in range(N):
        for j in range(M):
            black = i*(M-j)+j*(N-i)
            if black == K:
                print("Yes")
                return
    print("No")

solve()


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def solve():
    N, M, K = list(map(int, input().split(" ")))
    for i in range(N+1):
        for j in range(M+1):
            black = i*(M-j)+j*(N-i)
            if black == K:
                print("Yes")
                return
    print("No")

solve()

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, M, K = map(int, input().split())

success = False
for x in range(M):
    for y in range(N):
        temp = (M - x) * y + (N - y) * x
        if temp == K:
            success = True

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

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())

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

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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import itertools
N, M, K = [int(_) for _ in input().split()]
for i, j in itertools.product(range(N), range(M)):
    if (N-i)*j+i*(M-j) == K:
        print('Yes')
        exit()
print('No')


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
yes = "Yes"
no = "No"

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

ans = no
for y in range(N+1):
    for x in range(M+1):
        if N*M - (N-y) * (M-x) == K:
            ans = yes
            break
print(ans)


Failing test case input:
7 3 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
yes = "Yes"
no = "No"

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

ans = no
for y in range(N+1):
    for x in range(M+1):
        if N*M - (N-y) * (M-x) - x*y == K:
            ans = yes
            break
print(ans)
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import itertools
N, M, K = [int(_) for _ in input().split()]
for i, j in itertools.product(range(N), range(M)):
    if (N-i)*j+i*(M-j) == K:
        print('YES')
        exit()
print('NO')


Failing test case input:
0 3 3

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
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')

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m, k = list(map(int, input().split()))

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

Failing test case input:
7 17 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n, m, k = list(map(int, input().split()))

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

Problem: p03592
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N, M, K = map(int, input().split())

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

print('No')

Failing test case input:
0 3 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())

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

print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k = list(map(int,input().split()))
ans = 'No'
for i in range(n):
    for j in range(m):
        if i * m + j * n - 2 * i * j == k:
            ans = 'Yes'
print(ans)


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k = list(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)

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k=map(int,input().split())
t=False
for i in range(1,n+1):
    for j in range(1,m+1):
        if (n-i)*j+(m-j)*i==k:
            t=True
            print(i,j)
            break
print("Yes" if t else "No")

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
1 26
Yes


Fixed submission (verdict: Accepted):
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")
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


N, M, K = map(int, input().split())
flg = False
for k in range(1, N+1):
    for l in range(1, M+1):
        if K == k * (M - l) + l * (N - k):
            flg = True
            break
print('Yes' if flg else 'No')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):


N, M, K = map(int, input().split())
flg = False
for k in range( N+1):
    for l in range(M+1):
        if K == k * (M - l) + l * (N - k):
            flg = True
            break
print('Yes' if flg else 'No')

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k = map(int,input().split())

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

print('No')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, M, K=map(int, input().split())

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

Failing test case input:
7 17 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n, m, k = read_int_list()

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

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

    else:
        print('No')


main()


Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    n, m, k = read_int_list()

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

    print('No')


main()
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())
for i in range(1,n+1):
    for j in range(1,m+1):
        if i*(m-j)+(n-i)*j==k:
            break
    else:
        continue
    break
else:
    print('No')
    exit()
print('Yes')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())
for x in range(n+m+1):
    for a in range(min(n+1,x+1)):
        if 0<=x-a<=m:
            num=a*m+(x-a)*(n-2*a)
            if k==num:
                print("Yes")
                print(a,x-a)
                exit()
print("No")


Failing test case input:
1 13 1

Expected output:
Yes


Actual output:
Yes
0 1


Fixed submission (verdict: Accepted):
n,m,k=map(int,input().split())
for x in range(n+m+1):
    for a in range(min(n+1,x+1)):
        if 0<=x-a<=m:
            num=a*m+(x-a)*(n-2*a)
            if k==num:
                print("Yes")
                exit()
print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k = map(int,input().split())
nya = False
for i in range(n+1):
    for j in range(m+1):
        if i*n + j*m - 2*i*j == k:
            nya = True
            break
if nya:
    print('Yes')
else:
    print('No')


Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k = map(int,input().split())
nya = False
for i in range(n+1):
    for j in range(m+1):
        if i*m + j*n - 2*i*j == k:
            nya = True
            break
if nya:
    print('Yes')
else:
    print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N, M, K = [int(s) for s in input().split()]

canDo = 'No'

for n in range(N):
    for m in range(M):
        if n * (M - m) + m * (N - n) == K:
            canDo = 'Yes'
            break

print(canDo)       

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

N, M, K = [int(s) for s in input().split()]

canDo = 'No'

for n in range(0, N + 1):
    for m in range(0, M + 1):
        if n * (M - m) + m * (N - n) == K:
            canDo = 'Yes'
            break

print(canDo)

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, K = map(int, input().split())
ans = 'No'
for i in range(N + 1):
    for j in range(M + 1):
        tmp = i * (N - j) + j * (M - i)
        if tmp == K:
            ans = 'Yes'
            break

print(ans)

Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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)
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m, k = map(int, input().split())

bo = False
for  i in range(0,n):
    for j in range(0,m):
        if i*(m-j) + j*(n-i) == k:
            bo = True

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




Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m, k = map(int, input().split())

bo = False
for  i in range(0,n+1):
    for j in range(0,m+1):
        if i*(m-j) + j*(n-i) == k:
            bo = True

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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k = map(int, input().split())

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

Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k = map(int, input().split())

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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)
if K in A :
    print("Yes")
else :
    print("No")
    

Failing test case input:
1 13 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, k = map(int, input().split())
for i in range(n):
    for j in range(m):
        if i*m + j*n -2*i*j == k:
            print('Yes')
            exit()
print('No')


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())

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

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')
Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,M,K=map(int,input().split())
for i in range(N+1):
    cnt=0
    for j in range(M+1):
        cnt+=N*i+((M-i)-i)*j
        if cnt==K:
            print("Yes")
            exit()
else:
    print("No")

Failing test case input:
3 5 8

Expected output:
Yes

Actual output:
No


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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, K = map(int, input().split())
N, M = min(N, M), max(N, M)

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

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

Failing test case input:
6 2 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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 
            print('Yes')
            exit()
else:
    print('No')

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


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 + m - j == k:
                ans = 'Yes'
    print(ans)


if __name__ == "__main__":
    main()


Failing test case input:
7 9 8

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):


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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k = (int(i) for i in input().split())
ans = 'No'
for i in range(n):
  for j in range(m):
    if i*(n-j)+j*(m-i) == k:
      ans = 'Yes'
      break
print(ans)

Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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)

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())
for i in range(n):
    for j in range(m):
        if (n*i)+(m-2*i)*j==k:
            print('Yes')
            exit()
print('No')

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')
Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
n, m, k = map(int, input().split())

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


Failing test case input:
1 13 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, M, K = map(int, input().split())

ans = False
for n in range(0, N + 1):
    for m in range(0, M + 1):
        res = n * N + m * M - 2 * n * m
        if res == K:
            ans = True
            break

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


Failing test case input:
0 3 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())

ans = False
for n in range(0, N + 1):
    for m in range(0, M + 1):
        res = m * N + n * M - 2 * n * m
        if res == K:
            ans = True
            break

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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n ,m ,k = map(int,input().split())

sum = 0

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

   
      

Failing test case input:
0 3 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K=map(int,input().split())
flag=False

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

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M,K=map(int,input().split())
flag=False

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