ZhenlongDai/ACPR huggingface dataset:
Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
  n = input()
  inp = input()
  sum = 0
  order = 0 
  for c in inp:
    if ord(c) == ord('A') + order:
      if order == 2:
        sum += 1
        order = 0
      else:
        order += 1
  print(sum)

Failing test case input:
19
OGIRHSOWEFRENEUFNOF

Expected output:
0


Actual output:

Fixed submission (verdict: Accepted):
n = input()
inp = input()

sum = 0
order = 0

for c in inp:
  if ord(c) == ord('A'):
    order = 1
  elif ord(c) == ord('A') + order:
    order += 1
    if order == 3:
      order = 0
      sum += 1
  else:
    order = 0
print(sum)

Problem: p02812
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
	count = 0
	num = int(input())
	strings = input()
	print(len(strings))
	for i in range(0,num-2,1):
		if strings[i] == "A" and strings[i+1] == "B" and strings[i+2] == "C":	
			count += 1
	print(count)

if __name__ == '__main__':
	main()


Failing test case input:
19
DFIFENOVUORENOEERHS

Expected output:
0


Actual output:
19
0


Fixed submission (verdict: Accepted):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
	count = 0
	num = int(input())
	strings = input()
	
	for i in range(0,num-2,1):
		if strings[i] == "A" and strings[i+1] == "B" and strings[i+2] == "C":	
			count += 1
	print(count)

if __name__ == '__main__':
	main()

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()
count = 0
for i in range(N-2):
  print(S[i:i+3])
  if S[i:i+3] == 'ABC':
    count += 1
print(count)

Failing test case input:
10
ZBBCBOBADB

Expected output:
0


Actual output:
ZBB
BBC
BCB
CBO
BOB
OBA
BAD
ADB
0


Fixed submission (verdict: Accepted):
N = int(input())
S = input()
count = 0
for i in range(N-2):
  if S[i:i+3] == 'ABC':
    count += 1
print(count)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
ans = 0
for i in range(n - 2):
  if s[i:i + 3] == "ABC":
    ++ans
print(ans)


Failing test case input:
33
ACBACBBCCDCBAABCBCABCACBCCCBACBBA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
ans = 0
for i in range(n - 2):
  if s[i : i + 3] == "ABC":
    ans += 1
print(ans)
Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
count = 0

for i in range(n-2):
    if s[i]+s[i+1]+s[i+2] == 'abc':
        count += 1

print(count)

Failing test case input:
33
ACBACBBCBDCBAABCBCABCACCCCCBACBBA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
count = 0

for i in range(n-2):
    if s[i]+s[i+1]+s[i+2] == 'ABC':
        count += 1

print(count)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
N = len(s)
ans = 0
for i in range(N-2):
  if s[i:i+3] == 'ABC':ans += 1

print(ans)


Failing test case input:
10
ZABCDBABCQ

Expected output:
2

Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
ans = 0
if N < 3:print(0);exit()
for i in range(N-2):
  if s[i:i+3] == 'ABC':ans += 1

print(ans)

Problem: p02812
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
moji = str(input())
print(moji.count("ABC"))

Failing test case input:
33
ABBCABCCCBCACBACBCBAABCDCCBBCABCA

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
moji = str(input())
print(moji.count("ABC"))

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
	sum = 0
	order = 0
	n = input()
	inp = input()
	for c in inp:
		if ord(c) == ord('A') + order:
			if order == 2:
				sum += 1
				order = 0
			else:
				order += 1
		else:
			order = 0
	print(sum)

if __name__ == '__main__':
	main()

Failing test case input:
33
ABBAABCCCCCADBBDBBAAABCDBDBCCBBCA

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = input()
inp = input()

sum = 0
order = 0

for c in inp:
  if ord(c) == ord('A'):
    order = 1
  elif ord(c) == ord('A') + order:
    order += 1
    if order == 3:
      order = 0
      sum += 1
  else:
    order = 0
print(sum)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A=int(input())
B=input().split()
print(B.count("ABC"))


Failing test case input:
33
ABBAABCCCCCADBBDBBAAABCDBDBCCBBCA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
A=int(input())
B=input()
print(B.count("ABC"))

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
 
ans = 0
for i in range(n-2):
    if s[i:i+2] == 'ABC':
        ans += 1
 
print(ans)

Failing test case input:
33
ABCCABCBABCCABACBCBBABCBCBDBCABCB

Expected output:
5


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
 
ans = 0
for i in range(n - 2):
    if s[i:i+3] == 'ABC':
        ans += 1

print(ans)
Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str_len = int(input())
string_sample = input()
sample = 'ABC'

counter = 0
for i in range(str_len - 2):
  print(i)
  if string_sample[i:i+3] == sample:
    counter += 1
    
print(counter)

Failing test case input:
19
OGIOHSEVRFSFNETDNPF

Expected output:
0


Actual output:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0


Fixed submission (verdict: Accepted):
str_len = int(input())
string_sample = input()
sample = 'ABC'

counter = 0
for i in range(str_len - 2):
  if string_sample[i:i+3] == sample:
    counter += 1
    
print(counter)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()

ans = 0
for i in range(n):
    if s[i:i+2] == 'ABC':
        ans += 1

print(ans)

Failing test case input:
33
ABBCABCBCBCACBACBCBAABCDCCBBCABCA

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
 
ans = 0
for i in range(n - 2):
    if s[i:i+3] == 'ABC':
        ans += 1

print(ans)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
print(s.count("abc"))

Failing test case input:
33
ABBCABCBABCACBACBCBCABCDCCBBCABCB

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
print(s.count("ABC"))

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
N = len(s)
ans = 0
if N < 3:print(0);exit()
i = 0
while i < N-3:
  if s[i:i+3] == 'ABC':ans += 1;i += 3
  else:i+=1

print(ans)


Failing test case input:
33
ABBCABCBCBCACBACBCBAABCDCCBBCABCA

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
s = input()
ans = 0
if N < 3:print(0);exit()
for i in range(N-2):
  if s[i:i+3] == 'ABC':ans += 1

print(ans)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = str(input())
S.replace("abc","pq")
print(len(S) - N)


Failing test case input:
33
ABBCABCBABCACBACBCBBABCBCBDBCABCB

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
S = str(input())
S = S.replace("ABC","ab")
print(N - len(S))

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
total = int(input())
text = input()

res = 0

if total < 3:
    for x in range(0, total - 1):
        if text[x] == "A":
            if x + 2 <= total:
                if text[x + 1] == "B" and text[x + 2] == "C":
                    res += 1

print(res)

Failing test case input:
33
ACBACCBDBDCBAABCBCABCACCCCCBACBBA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
total = int(input())
text = input()

res = 0

if total >= 3:
    for x in range(0, total - 1):
        if text[x] == "A":
            if x + 3 <= total:
                if text[x + 1] == "B" and text[x + 2] == "C":
                    res += 1

print(res)
Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input().count("ABC"))

Failing test case input:
10
ZABCCB@BDQ

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
input()
print(input().count("ABC"))

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input() 
S = input()
print(S.find("ABC"))

Failing test case input:
33
ABBCABCCCCCACBACBCBAABCDBDBCCABCA

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N = input() 
S = input()
print(S.count("ABC"))

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
sum = 0
order = 0
n = input()
inp = input()
for c in inp:
	if ord(c) == ord('A') + order:
		if order == 2:
			sum += 1
			order = 0
		else:
			order += 1
	else:
		order = 0
print(sum)

Failing test case input:
33
ABBAABCCCCDADBBDBBAAABCDCDBCDBBCA

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = input()
inp = input()

sum = 0
order = 0

for c in inp:
  if ord(c) == ord('A'):
    order = 1
  elif ord(c) == ord('A') + order:
    order += 1
    if order == 3:
      order = 0
      sum += 1
  else:
    order = 0
print(sum)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()

flag = 0
cnt = 0
for i in s:
    if i == "A" and flag == 0:
        flag += 1
    
    elif i == "B" and flag == 1:
        flag += 1
    
    elif i == "C" and flag == 2:
        cnt += 1
        flag = 0
    
    else:
        flag = 0

print(cnt)

Failing test case input:
33
ABBAABCCCCDADBBDBBAAABCDCDBCDBBCA

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
s = input()

flag = 0
cnt = 0
for i in s:
    if i == "A" and (flag == 0 or flag == 1):
        flag = 1
    
    elif i == "B" and flag == 1:
        flag = 2
    
    elif i == "C" and flag == 2:
        cnt += 1
        flag = 0
    
    else:
        flag = 0

print(cnt)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = str(input())
S.replace("abc","pq")
print(N - len(S))


Failing test case input:
33
ABBAABCCCCDADBBDBBAAABCDCDBCDBBCA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
S = str(input())
S = S.replace("ABC","ab")
print(N - len(S))

Problem: p02812
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
i =input()

c=0

for j in range(0,n-2):
  print(i[j:j+3])
  if i[j:j+3]=="ABC":
    c+=1
print(c)

Failing test case input:
10
DBCCBNBAZB

Expected output:
0


Actual output:
DBC
BCC
CCB
CBN
BNB
NBA
BAZ
AZB
0


Fixed submission (verdict: Accepted):
n = int(input())
i =input()

c=0

for j in range(0,n-2):
  if i[j:j+3]=="ABC":
    c+=1
print(c)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = str(input())

print(S.count('ABC'))

Failing test case input:
33
BDBACBCBCBCBABBCBCABACCBABCBACCBA

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())


S = str(input())

print(S.count('ABC'))
Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
S = input()

count = 0
result = 0
for s in S:
  if count == 0 and s == "A":
    count += 1
  elif count == 1 and s == "B":
    count += 1
  elif count == 2 and s == "C":
    count = 0
    result += 1
  else:
    count = 0
print(result)

Failing test case input:
33
ABBCABCBCBCACBACBCBAABCDCCBBCABCA

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N = input()
S = input()

count = 0
result = 0
for s in S:
  if s == "A":
    count = 1
  elif count == 1 and s == "B":
    count += 1
  elif count == 2 and s == "C":
    count = 0
    result += 1
  else:
    count = 0
print(result)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

res = 0
for i in range(len(S)-2):
  if S[i] == 'A' and S[i+1] == 'B' and S[i+2] == 'C':
    res += 1
    
print(res)


Failing test case input:
10
YABCCQABDB

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N = input()
S = input()

res = 0
for i in range(len(S)-2):
  if S[i] == 'A' and S[i+1] == 'B' and S[i+2] == 'C':
    res += 1
    
print(res)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = input()

cnt = 0
flg = 0
for i in range(N):
  if flg == 0 and s[i] == "A":
    flg = 1
  elif flg == 1 and s[i] == "B":
    flg = 2
  elif flg == 2 and s[i] == "C":
    flg = 0
    cnt += 1
  else:
    flg = 0
print(cnt)
    

Failing test case input:
33
ABBCABCCCCCACBACBCBAABCDBDBCCABCA

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
s = input()

cnt = 0
flg = 0
for i in range(N):
  if s[i] == "A":
    flg = 1
  elif flg == 1 and s[i] == "B":
    flg = 2
  elif flg == 2 and s[i] == "C":
    flg = 0
    cnt += 1
  else:
    flg = 0

print(cnt)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
x = list(s)
y = 0
a = 0
while y <= n - 3:
  z = x[y] + x[y + 1] + x[y + 2]
  if z == "abc":
    a += 1
    y += 1
  else:
    a += 0
    y += 1

print(a)


Failing test case input:
10
ZABCDB@BCQ

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
x = list(s)
y = 0
a = 0
while y <= n - 3:
  z = x[y] + x[y + 1] + x[y + 2]
  if z == "ABC":
    a += 1
    y += 1
  else:
    a += 0
    y += 1
print(a)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = list(str(input()))

tmp = 0
count = 0
for i in S:
  if i == "A":
    tmp = 1
  elif i == "B" and tmp == 1:
    tmp = 2
  elif i == "C" and tmp == 2:
    count += 1
print(count)

Failing test case input:
33
ABBAABCCCCDADBBDBBAAABCDCDBCDCBCA

Expected output:
2


Actual output:
9


Fixed submission (verdict: Accepted):
N = int(input())
S = list(str(input()))

tmp = 0
count = 0
for i in S:
  if i == "A":
    tmp = 1
  elif i == "B" and tmp == 1:
    tmp = 2
  elif i == "C" and tmp == 2:
    count += 1
    tmp = 0
  else:
    tmp = 0
print(count)
Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()

flag = 0
cnt = 0
for i in s:
    if i == "A":
        flag += 1
    
    elif i == "B" and flag == 1:
        flag += 1
    
    elif i == "C" and flag == 2:
        cnt += 1
        flag = 0
    
    else:
        flag = 0

print(cnt)

Failing test case input:
33
ABBAABCCCCDADBBDBBAAABCDCDBCDCBCA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()

flag = 0
cnt = 0
for i in s:
    if i == "A" and (flag == 0 or flag == 1):
        flag = 1
    
    elif i == "B" and flag == 1:
        flag = 2
    
    elif i == "C" and flag == 2:
        cnt += 1
        flag = 0
    
    else:
        flag = 0

print(cnt)

Problem: p02812
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
s = list(input())
type = "A"
count = 0
for char in s:
    if char == "A" and type == "A":
        type = "B"
    elif char == "B" and type == "B":
        type = "C"
    elif char == "C" and type == "C":
        count += 1
        type = "A"
    else:
        type = "A"
print(count)

Failing test case input:
33
ABBCABCCCBCACBACBCBAABCDCCBBCABCA

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
s = list(input())
type = "A"
count = 0
for char in s:
    if char == "A":
        type = "B"
    elif char == "B" and type == "B":
        type = "C"
    elif char == "C" and type == "C":
        count += 1
        type = "A"
    else:
        type = "A"
print(count)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = int(input())
i = input()
result = 0

match = ""
for r in range(l):
  if i[r] == "A" and match == "":
    match += i[r]
  elif i[r] == "B" and match == "A":
    match += i[r]
  elif i[r] == "C" and match == "AB":
    match = ""
    result += 1
  else:
    match = ""

print(result)

Failing test case input:
33
ACBACCBDBDCBAABCBDBBCACCCCCBABBBA

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
l = int(input())
i = input()
result = 0

match = ""
for r in range(l):
  if i[r] == "A" and match == "":
    match += i[r]
  elif i[r] == "B" and match == "A":
    match += i[r]
  elif i[r] == "C" and match == "AB":
    match = ""
    result += 1
  else:
    match = i[r]

print(result)

Problem: p02812
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
s=input()
cnt=0
for i in range(n-3+1):
    if s[i:i+4]=="ABC": cnt+=1
print(cnt)

Failing test case input:
33
ABCCABCBABCCABACBCBBABCBCBCBCABDB

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
cnt=0
for i in range(n-3+1):
    if s[i:i+3]=="ABC": cnt+=1
print(cnt)
Problem: p02812
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
S=input()
 
nabc=0
for i in range(0,N-2):
  if S[i:i+2]=='ABC':
    nabc+=1
 
print(nabc)

Failing test case input:
33
ACBACCBDBDCBAABCBCABCACCCCCBACBBA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
N=int(input())
S=input()
 
slen=len(S)
nabc=0
for i in range(0,slen-2):
  if S[i:i+3]=='ABC':
    nabc+=1
 
print(nabc)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = int(input())
 
word = input()
 
counter = 0
for i in range(len(word)):
  if len(word[i:]) >= 3:
    if word[i:i+3] == 'abc':
      counter += 1
      
print(counter)

Failing test case input:
33
ABBAABCCCCCADBBDBBAAABCDBDBCDBBCA

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
l = int(input())
 
word = input()
 
counter = 0
for i in range(len(word)-2):
  if word[i:i+3] == 'ABC':
    counter += 1
      
print(counter)

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
print(S.count('ABC'))

Failing test case input:
33
ACBACCBDBDCBAABCBDBBCACCCCCBABBBA

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
S = input()
print(S.count('ABC'))

Problem: p02812
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = a.count('ABC')
print(b)

Failing test case input:
10
ZABCDB@BCQ

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
c=input()
a = input()
b = a.count('ABC')
print(b)

Problem: p02812
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
print(S.count('ABC'))

Failing test case input:
33
ABBCABCCCCCACBACBCBAABCDBDBBCABCA

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
S = input()
print(S.count('ABC'))
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):
        tmp=N*j+M*i-i*j
        if tmp==k:
            print("Yes")
            exit()
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):
        tmp=N*j+M*i-2*i*j
        if tmp==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(n + 1):
	for j in range(m + 1):
		if i * (n - j) + j *(m - i) == k:
			print("Yes")
			break
	else:
		continue
	break
else:
	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")
			break
	else:
		continue
	break
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):
        a = n*j + m*i - i*j
        if a == k:
            print("Yes")
            exit()
print("No")

Failing test case input:
7 3 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):
        a = n*j + m*i - 2*i*j
        if a == 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(1, n + 1):
    for j in range(1, m + 1):
        if i * (m - j) + j * (n - 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 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 k in range(N+1):
    for l in range(M+1):
        if k * (N-l) + l * (M-k) == K:
            print("Yes")
            import sys
            sys.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 k in range(N+1):
    for l in range(M+1):
        if k * (M-l) + l * (N-k) == K:
            print("Yes")
            import sys
            sys.exit()

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

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

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




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

print('Yes' if isok else '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())

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

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

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 or (N * M) - (i * N + j * M - 2 * i * j) == K:
            print('Yes')
            sys.exit()

print('No')


Failing test case input:
0 3 3

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

Failing test case input:
7 9 20

Expected output:
No

Actual output:
Yes


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

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

print("No")


Failing test case input:
3 5 8

Expected output:
Yes

Actual output:
1 2


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

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

Failing test case input:
7 3 8

Expected output:
Yes


Actual output:
No


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

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

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

for i in range(100000):
    cnt *= 2
    if cnt == K:
        print("Yes")
else:
    print("No")
    

Failing test case input:
0 34 8

Expected output:
No


Actual output:
Yes
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 == (N-i)*j + (M-j)*i:
            print("Yes")
            exit()

print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K = map(int,input().split())
s = set()
for i in range(N+1):
    for j in range(M+1):
        s.add(i*(N-j)+j*(M-i))
if list(s).count(K)>0: 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())
s=set()
for i in range(N+1):
    for j in range(M+1):
        s.add(j*(N-i)+i*(M-j))
print("Yes" if K in s else "No")

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

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, m, k = list(map(int, input().split()))
for i in range(n+1):
    for j in range(m+1):
        if (n-j)*i + (m-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 = list(map(int, input().split()))
for i in range(n+1):
    for j in range(m+1):
        if m*i + n*j - 2*(i*j) == k:
            print('Yes')
            exit()
print('No')
Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, M, K = map(int, input().split())




if N==1 or M==1:
    print('Yes')
    exit()

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

print('Yes' if isok else '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())

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

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

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):
    for j in range(m):
        if i * (n - j) + j * (m - i) == k:
            flg = True
            break
        else:
            pass
if flg:
    print("Yes")
else:
    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())
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):
n, m, k = list(map(int, input().split()))
for i in range(m+1):
    for j in range(n+1):
        if (m * i) + (n * j) - 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 = 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")

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

for nn in range(n):
	for mm in range(m):
		if nn*m+mm*n-mm*nn==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 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")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(n, m, k):
    for i in range(n):
        for j in range(m):
            if i * j + (n - i) * (m - j) == k:
                return 'Yes'
    return 'No'


print(solve(*map(int, input().split())))


Failing test case input:
1 13 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def solve(n, m, k):
    for i in range(n + 1):
        for j in range(m + 1):
            if i * j + (n - i) * (m - j) == k:
                return 'Yes'
    return 'No'


print(solve(*map(int, input().split())))
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+1):
  for j in range(m+1):
    if i*(n-j)+j*(m-i) == k:
      ans = 'Yes'
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())
ansx = -1
ansy = -1
for k in range(N):
  for l in range(M):
    if k*(M-l)+l*(N-k) == K:
      ansx = k
      ansy = l
if ansx == -1 and ansy == -1:
  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())
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')

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 or k < 0:
        continue
    if k % n == 0:
        print('Yes')
        exit()
else:
    print('No')

Failing test case input:
0 2 8

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.4.3), verdict: Wrong Answer):
N, M, K = map(int, input().split())

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

Failing test case input:
1 20 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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*N-i*j*2 == K:
                return 'Yes'
    
    return 'No'
            
print(solve())
Problem: p03592
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):

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

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

Failing test case input:
7 5 12

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

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

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

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K=map(int,input().split())
for k in range(1,N+1):
    for l in range(1,M+1):
        tmp=(M-l)*k+(N-k)*l
        if tmp==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 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")

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


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

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):
import sys
import heapq


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

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

print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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(N+1)] 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(' '))
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')

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

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

Failing test case input:
7 34 8

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

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

Failing test case input:
0 3 3

Expected output:
No


Actual output:
0 0
Yes


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

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):
        if k == c*(m-r) + r*(n-c):
            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 r in range(n+1):
    for  c in range(m+1):
        if k == c*(n-r) + r*(m-c):
            print('Yes')
            exit()

print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(w, h, k):
    for y in range(1, h+1):
        if h == 2*y:
            continue
        x = (k - y*w) 
        if not (1 <= 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))

Failing test case input:
1 20 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def solve(w, h, k):
    for y in range(h+1):
        if h == 2*y:
            continue
        x = (k - y*w) 
        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))

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

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


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

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
M,N,K = map(int,input().split())
if N > M:
    tmp = M
    M = N
    N = tmp
for i in range(N+1):
    for j in range(M+1):
        if M*i + N*j - 2*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())
ans = 'No'
flag = False
for x in range(M+1):
    if flag:
        break
    for y in range(N+1):
        if (M-y)*x+(M-x)*y == K:
            ans = 'Yes'
            flag = True
            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'
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)

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):
        for j in range(M):
            if N*i+M*j-2*i*j == K:
                return 'Yes'
    return 'No'

print(sea())

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


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


Failing test case input:
3 5 8

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 = [int(x) for x in input().split()]

ans = "No"
for i in range(n):
    for j in range(m):
        if i * (m-j) + j * (n-i) == 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 = [int(x) for x 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())
ok = False
for i in range(1,n+1):
    for j in range(1,m+1):
        if i*(m-j)+(n-i)*j == k:
            ok = True
            break
if ok: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())
ok = False
for i in range(n+1):
    for j in range(m+1):
        if i*(m-j)+(n-i)*j == k:
            ok = True
            break
if ok: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 + 1):
	for j in range(m + 1):
		if i * (n - j) + j *(m - i) == k:
			print("Yes")
			exit()
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())

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

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,m,k = map(int, input().split())
for i in range(n):
	for j in range(m):
		if i*(m-j)+j*(n-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 i*m-i*j+j*n-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, sys.stdin.readline().split())


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

print("No")

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys

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


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

print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def resolve():
    n, m, k = map(int, input().split())
    for l in range(1, n + 1):
        for r in range(1, m + 1):
            black = l * m + r * n - 2 * r * l
            if black == k:
                print("Yes")
                return 0
    print("No")


if __name__ == "__main__":
    resolve()


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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()
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import exit
N, M, K = map(int, input().split())
for k in range(1, N + 1):
    for la in range(1, M + 1):
        if k * (M - la) + (N - k) * la == K:
            print("Yes")
            exit()
print("No")


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from sys import exit
N, M, K = map(int, input().split())
for k in range(N + 1):
    for la in range(M + 1):
        if k * (M - la) + (N - k) * la == 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(1,N+1):
    for j in range(1,M+1):
        tmp = i*(N-j)+j*(M-i)
        if tmp == K:
            print('Yes')
            exit()
        else:continue
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(" "))
ans = 'No'
for i in range(1,N+1):
    for j in range(1,M+1):
        tmp = i*(M-j)+j*(N-i)
        if tmp == K:
            ans = 'Yes'
            break
        else:continue
    if ans == 'Yes':
        break
if K == N*M or K == 0:
    ans = 'Yes'
print(ans)

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




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


ans = 'No'
eflg = False
for i in range(n):
    for j in range(m):
        pt = i * (m - j) + j * (n - i)
        if pt == k:
            ans = 'Yes'
            eflg = True
            break
    if eflg:
        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'
eflg = False
for i in range(n+1):
    for j in range(m+1):
        pt = i * (m - j) + j * (n - i)
        if pt == k:
            ans = 'Yes'
            eflg = True
            break
    if eflg:
        break


print(ans)

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

print('Yes' if any(a*n+b*m==k+2*a*b for a,b in product(range(n+1),range(m+1))) else '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())
from itertools import product

print('Yes' if any(abs(a*m+b*n-2*a*b)==k for a,b in product(range(n+1),range(m+1))) else 'No')

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

res = 'No'

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

print(res)            



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

res = 'No'

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

print(res)