qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = int(input())
D = [int(i) for i in input().split()]
M = int(input())
T = [int(i) for i in input().split()]

dic_D = {} 
for d in D:
    dic_D[d] = dic_D.get(d,0) + 1
dic_T = {}
for t in T:
    dic_T[t] = dic_T.get(t,0) + 1
    
for k in dic_T:
    if dic_T[k]>dic_D.get(k,0):
        print("YES")
        break
else:
    print("NO")


Fixed code:
N = int(input())
D = [int(i) for i in input().split()]
M = int(input())
T = [int(i) for i in input().split()]

dic_D = {} 
for d in D:
    dic_D[d] = dic_D.get(d,0) + 1
dic_T = {}
for t in T:
    dic_T[t] = dic_T.get(t,0) + 1
    
for k in dic_T:
    if dic_T[k]>dic_D.get(k,0):
        print("NO") 
        break
else:
    print("YES")
Buggy code:
import sys
from collections import Counter
candnum=int(input())
candiff=list(map(int,input().split()))
pronum=int(input())
candiff=Counter(candiff)
prodiff=list(map(int,input().split()))
prodiff=Counter(candiff)
if pronum>candnum:
    print("NO")
    sys.exit()
for k,v in prodiff.items():
    if k in candiff:
        if candiff[k]<v:
            print("NO")
            sys.exit()
    else:
        print("NO")
        sys.exit()
print("YES")

Fixed code:
import sys
from collections import Counter
candnum=int(input())
candiff=list(map(int,input().split()))
pronum=int(input())
prodiff=list(map(int,input().split()))

candiff=Counter(candiff)
prodiff=Counter(prodiff)
if pronum>candnum:
    print("NO")
    sys.exit()
for k,v in prodiff.items():
    if k in candiff:
        if candiff[k]<v:
            print("NO")
            sys.exit()
    else:
        print("NO")
        sys.exit()
print("YES")
Buggy code:
import collections
N = int(input())
D = [int(i) for i in input().split()]
M = int(input())
T = [int(i) for i in input().split()]

count_D = collections.Counter(D)
count_T = collections.Counter(T)

ans = 'YES'
for k,v in count_T.items():
  if D[k] < v:
    ans = 'NO'
    break
print(ans)

Fixed code:
import collections
N = int(input())
D = [int(i) for i in input().split()]
M = int(input())
T = [int(i) for i in input().split()]

count_D = collections.Counter(D)
count_T = collections.Counter(T)

ans = 'YES'
for k,v in count_T.items():
  if count_D[k] < v:
    ans = 'NO'
    break
print(ans)
Buggy code:
from collections import defaultdict

n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))
di = defaultdict(lambda: 0)

for i in d:
    di[i] += 1
      
ans = "Yes" 
      
for i in t:
    if not di[i] or (di[i] == 0):
        ans = "No"
        break
    else:
        di[i] -= 1
         
print(ans)

Fixed code:
from collections import defaultdict

n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))

di = defaultdict(lambda: 0)

for i in d:
    di[i] += 1
      
ans = "YES" 
      
for i in t:
    if (i not in di) or (di[i] == 0):
        ans = "NO"
        break
    else:
        di[i] -= 1
         
print(ans)
Buggy code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
D = input().split(" ")
M = int(input())
T = input().split(" ")


if len(D) < len(T):
	print("NO")
	exit(0)

D.sort()
T.sort()

i = 0
j = 0

while True:
	if i > M-1:
		print("YES")
		break
	elif D[j] == D[i] :
		i += 1
		j += 1

	else:
		j += 1

		if j > N - 1:
			print("NO")
			break

		elif D[j] > D[i]:
			print("NO")
			break


Fixed code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
D = input().split(" ")
M = int(input())
T = input().split(" ")


if len(D) < len(T):
	print("NO")
	exit(0)

D.sort()
T.sort()

i = 0
j = 0

while True:
	if i > M-1:
		print("YES")
		break

	elif D[j] == T[i] :
		i += 1
		j += 1

	else:
		j += 1

		if j > N - 1:
			print("NO")
			break

		elif D[j] > T[i]:
			print("NO")
			break
Buggy code:
from collections import Counter

if __name__ == '__main__':
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    counter_d = Counter(D)
    counter_t = Counter(T)

    ans = "Yes"
    for point, num in counter_t.items():

        if counter_d.get(point) is None or counter_d.get(point) < num:
            ans = "No"
            break

    print(ans)


Fixed code:
from collections import Counter

if __name__ == '__main__':
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    counter_d = Counter(D)
    counter_t = Counter(T)

    ans = "YES"
    for point, num in counter_t.items():
        if counter_d.get(point) is None or counter_d.get(point) < num:
            ans = "NO"
            break

    print(ans)
Buggy code:
inputs = input()
N = int(inputs)

inputs = input().split()

prob = {}
for i in inputs:
    if not int(i) in prob.keys():
        prob[int(i)] = 1
    else:
        prob[int(i)] += 1

inputs = input()
M = int(inputs)

inputs = input().split()
flag = True

for i in inputs:
    prob[int(i)] -= 1
    if prob[int(i)] < 0:
        flag = False

if flag:
    print('YES')
else:
    print('NO')

Fixed code:
inputs = input()
N = int(inputs)

inputs = input().split()

prob = {}
for i in inputs:
    if not int(i) in prob.keys():
        prob[int(i)] = 1
    else:
        prob[int(i)] += 1

inputs = input()
M = int(inputs)

inputs = input().split()
flag = True

for i in inputs:
    if not int(i) in prob.keys():
        flag = False
    else:
        prob[int(i)] -= 1
        if prob[int(i)] < 0:
            flag = False

if flag:
    print('YES')
else:
    print('NO')
Buggy code:
H, W = 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')

Fixed code:
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')
Buggy code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, M, K = mapint()

s = set()
for n in range(N+1):
    for m in range(M+1):
        s.add(n*M + m*N - n*m)
if K in s:
    print('Yes')
else:
    print('No')

Fixed code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, M, K = mapint()

s = set()
for n in range(N+1):
    for m in range(M+1):
        s.add(n*M + m*N - n*m*2)

if K in s:
    print('Yes')
else:
    print('No')
Buggy code:
#!/usr/bin/env python3

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


Fixed code:
#!/usr/bin/env python3

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()
Buggy code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

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

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


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

    A = [N * (i + 1) for i in range(M)]
    B = [M * (i + 1) for i in range(N)]
    C = [N + (M - 2)*i for i in range(N)]
    D = [M + (N - 2)*i for i in range(M)]

    print(set([0] + A + B + C + D))
    print("Yes" if K in set([0] + A + B + C + D) else "No")


if __name__ == '__main__':
    main()

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

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

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


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

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

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


if __name__ == '__main__':
    main()
Buggy code:
a,b,c=map(int,input().split())
for i in range(a):
    for j in range(b):
        if (a-i)*b+(b-j)*a==c:
            print('Yes')
            exit()
print('No')

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

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

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

print(ans)
Buggy code:
n, m, k = map(int, input().split())
r = "No"
for i in range(n+1):
    for j in range(m+1):
        if i*m+j*n-i*j == k:
            r = "Yes"
print(r)

Fixed code:
n, m, k = map(int, input().split())
r = "No"
for i in range(n+1):
    for j in range(m+1):
        if i*m+j*n-2*i*j == k:
            r = "Yes"
print(r)
Buggy code:
N,M,K = [int(hoge) for hoge in input().split()]
ans = "No"
for n in range(N+1):
    for m in range(M+1):
        if m*(N-n) +n*(M-n)  == K:
            ans = "Yes"
print(ans)

Fixed code:
N,M,K = [int(hoge) for hoge in input().split()]
ans = "No"
for n in range(N+1):
    for m in range(M+1):
        if m*(N-n) +n*(M-m)  == K:
            ans = "Yes"
print(ans)
Buggy code:
import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions

import copy

# import heapq
# from collections import deque
# import decimal

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


# ===CODE===

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


Fixed code:
import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions

import copy

# import heapq
# from collections import deque
# import decimal

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


# ===CODE===

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

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

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

n, m, k = map(int, stdin.readline().rstrip().split())

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

print("No")


Fixed code:
import sys
from sys import stdin

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

print('No')
Buggy code:
N,M,K=map(int,input().split())
a=0
for i in range(1,N+1):
    for j in range(1,M+1):
        if i*M+j*N-i*j==K:
            print(i,j)
            a=1
print(["No","Yes"][a])

Fixed code:
N,M,K=map(int,input().split())
a=0
for i in range(N+1):
    for j in range(M+1):
        if i*M+j*N-2*i*j==K:
            a=1
print(["No","Yes"][a])
Buggy code:
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")


Fixed code:
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")
Buggy code:
N, M, K = map(int, input().split())

ans = False
for n in range(N + 1):
    if (M * n - K) % (2 * n - N) == 0:
        ans = True
        break
print('Yes' if ans else 'No')


Fixed code:
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")
Buggy code:
N,M,K=list(map(int, input().split()))

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

print(sea())

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

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

ans = 'No'
for i in range(n+1):
    for j in range(m+1):
        black = i*(m-j) + j*(n-i)
        if black == k:
            ans = 'Yes'
            break
print(ans)
Buggy code:
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)

Fixed code:
n,m,k=map(int,input().split())
ans="No"
for i in range(n+1):
    for j in range(m+1):
        if i*m+j*n-2*i*j==k:
            ans="Yes"
            break
print(ans)
Buggy code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007

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




Fixed code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007

n, m, k = LI()
for i in range(n + 1):
    for j in range(m + 1):
        if k == i * m + j * n - i * j * 2:
            print('Yes')
            exit()
else:
    print('No')
Buggy code:
from sys import stdin
n,m,k = [int(x) for x in stdin.readline().rstrip().split()]

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

Fixed code:
from sys import stdin
n,m,k = [int(x) for x in stdin.readline().rstrip().split()]

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

Fixed code:
N,M,K = map(int,input().split())
flg = 0
for i in range(N+1) :
	for j in range(M+1) :
		if i * M + j * N - i * j * 2 == K : flg = 1
if flg : print("Yes")
else : print("No")
Buggy code:
N,M,K=map(int,input().split())
ans="No"
for n in range(K+1):
  for m in range(K-n):
    if n*(N-m)+m*(N-n)==K:
      ans="Yes"
      break
print(ans)

Fixed code:
N,M,K = map(int,input().split())
ans = 'No'
for n in range(N+1):
    for m in range(M+1):
        tmp = ((N-n)*m + (M-m)*n)
        if tmp==K:
            ans = 'Yes'
print(ans)
Buggy code:
n,m,k = map(int, input().split())
ans = "No"
for i in range(n+1):
    l = k-i*m
    j = n-2*i
    if j==0:
        if l==0:
            ans = "Yes"
        else:
            continue
    else:
        if l%j==0:
            ans = "Yes"
        else:
            continue
print(ans)

Fixed code:
n,m,k = map(int, input().split())
ans = "No"
for i in range(n+1):
    for j in range(m+1):
        l = i*(m-j) + (n-i)*j
        if k==l:
            ans ="Yes"
        else:
            continue
print(ans)
Buggy code:
N,M,K = map(int,input().split())
for i in range(N+1):
  for j in range(M+1):
    if N*M - i*j == K:
      print("Yes")
      break
  else:
    continue
  break
else:
  print("No")


Fixed code:
N, M, K = map(int, input().split())
p = 'No'
for i in range(N+1):
  for j in range(M+1):
    if i * j + (N - i) * (M - j) == K:
      p = 'Yes'
      break
print(p)
Buggy code:
N,M,K = map(int,input().split())
ans = False
for p in range(N+1):
    for q in range(M+1):
        if p*M+q*N - p*q == K or p*M+q*N - p*q == M*N-K:
            ans = True
if ans:print("Yes")
else:print("No")

Fixed code:
N,M,K = map(int,input().split())
ans = False
for p in range(N+1):
    for q in range(M+1):
        if p*M+q*N - 2*p*q == K:
            ans = True
if ans:print("Yes")
else:print("No")
Buggy code:
from sys import stdin
N,M,K = [int(x) for x in stdin.readline().rstrip().split()]
flag = False
for a in range(N+1):
    for b in range(M+1):
        if a*N + b*M - a*b == K:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Fixed code:
from sys import stdin
N,M,K = [int(x) for x in stdin.readline().rstrip().split()]
flag = False
for a in range(N+1):
    for b in range(M+1):
        if (N-a)*b + (M-b)*a == K:
            flag = True
if flag:
    print("Yes")
else:
    print("No")
Buggy code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

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')
    else:
      print('No')


Fixed code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

n,m,k = map(int, input().split())
for i in range(n + 1):
  for j in range(m + 1):
    if n * j + m * i - 2 * i * j == k:
      print('Yes')
      exit(0)
print('No')
Buggy code:
n,m,k = map(int,input().split())
a = set()
for i in range(n+1):
  for j in range(m+1):
    a.add(m*i+n*j-i*j)
print('YNeos'[k not in a::2])

Fixed code:
n,m,k = map(int,input().split())
a = set()
for i in range(n+1):
  for j in range(m+1):
    a.add(m*i+n*j-i*j*2)
print('YNeos'[k not in a::2])
Buggy code:
if __name__ == "__main__":
    N, M, K = map(int, input().split())

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


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

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

    print("No")
Buggy code:
N,M,k=map(int,input().split())
for i in range(N+1):
    for j in range(M+1):
        tmp=N*j+M*i-i*j
        if tmp==k:
            print("Yes")
            exit()
print("No")

Fixed code:
N,M,k=map(int,input().split())
for i in range(N+1):
    for j in range(M+1):
        tmp=N*j+M*i-2*i*j
        if tmp==k:
            print("Yes")
            exit()
print("No")
Buggy code:
N, M, K = map(int, input().split())
for n in range(N + 1):
  for m in range(M + 1):
    if n * (M - m) + m * (N - n) == K:
      print("Yes")
      break
else: print("No")

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


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

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

    return "No"

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

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


if __name__ == "__main__":
    main()