qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n, k = map(int, input().split())
print(1 if n % k == 0 else 0)

Fixed code:
n, k = map(int, input().split())
if n%k ==0:
    print(0)
else:
    print(1)
Buggy code:
n,k = map(int,input().split())
if k%n:
  print(1)
else:
  print(0)

Fixed code:
n, k = map(int, input().split())
if n%k==0:
    print(0)
else:
    print(1)
Buggy code:
N, K = map(int,input().split())

if N%K=0:
   print(0)
else:
   print(1)

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

if N % K == 0 :
    print("0")
else :
    print("1")
Buggy code:
a,b = map(int,input().split())
print(0) if b%a == 0 else print(1)

Fixed code:
a,b = map(int,input().split())
print(0) if a%b == 0 else print(1)
Buggy code:
n, k = list(map(int, input().split()))
if n%k != 0:
	print(n//k + 1)
else:
	print(n//k)

Fixed code:
n, k = list(map(int, input().split()))
if n%k != 0:
	print(1)
else:
	print(0)
Buggy code:
a = input()
num = a.split(' ')
N = num[0]
K = num[1]
j = N % K

if j == 0:
	print(0)
else:
	print(1)


Fixed code:
a = input()
num = a.split(' ')
N = int(num[0])
K = int(num[1])
j = N % K
if j == 0:
	print(0)
else:
	print(1)
Buggy code:
N = int(input())

for i in range(26):
  for j in range(16):
    if(4*i + 7*j == N):
      print("Yes")
      break
else:
  print("No")

Fixed code:
N = int(input())

for i in range(26):
  for j in range(16):
    if(4*i + 7*j == N):
      print("Yes")
      exit()
else:
  print("No")
Buggy code:
a=int(input())
for i in range(26):
  for l in range(15):
    if 4*i+7*j==100:
      print("Yes")
      exit()
print("No")

Fixed code:
a=int(input())
for i in range(26):
  for j in range(15):
    if 4*i+7*j==a:
      print("Yes")
      exit()
print("No")
Buggy code:
c = 4 * 7
n = int(input()) % c
i = n
while 0 < i:
    j = i
    while 0 < j:
        print(i, j)
        j -= 7
        if j == 0:
            print("Yes")
            exit()
    i -= 4
    if i == 0:
        print("Yes")
        exit()
print("No")


Fixed code:
c = 4 * 7
n = int(input())
if n == c:
    print("Yes")
    exit()
m = n % c
i = n
while 0 < i:
    j = i
    while 0 < j:
        j -= 7
        if j == 0:
            print("Yes")
            exit()
    i -= 4
    if i == 0:
        print("Yes")
        exit()
print("No")
Buggy code:
N = int(input())
for i in range(100):
    for j in range(100):
        if 4 * i + 7 * j == n:
            print("Yes")
            exit(0)
print("No")

Fixed code:
N = int(input())
for i in range(100):
    for j in range(100):
        if 4 * i + 7 * j == N:
            print("Yes")
            exit(0)
print("No")
Buggy code:
n=int(input())
for i in range(n/4):
    for j in range(n/7):
        if(i*4+j*7==n):
            flag=True

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


Fixed code:
n=int(input())
flag=False
for i in range(int(n/4)+1):
    for j in range(int(n/7)+1):
        if(i*4+j*7==n):
            flag=True

if(flag==True):
    print("Yes")
else:
    print("No")
Buggy code:
N = int(input())
max_4 = int(N/4)
max_7 = int(N/7)
Flag = 0
for i in range(max_4):
    for j in range(max_7):
        if N == i*4 + j*7:
            Flag = 1
            break
    if Flag == 1:
        break
if Flag == 1:
    print("Yes")
else:
    print("No")
        

Fixed code:
N = int(input())
max_4 = int(N/4)+1
max_7 = int(N/7)+1
Flag = 0
for i in range(max_4):
    for j in range(max_7):
        if N == i*4 + j*7:
            Flag = 1
            break
    if Flag == 1:
        break
if Flag == 1:
    print("Yes")
else:
    print("No")
Buggy code:
n = int(input())
ans="No"
for i in range(n+1):
    for j in range(n+1):
        if n-4*i-7*j == 0:
            ans+="Yes"
print(ans)

Fixed code:
n = int(input())
ans="No"
for i in range(n+1):
    for j in range(n+1):
        if n-4*i-7*j == 0:
            ans="Yes"
print(ans)
Buggy code:
import sys

N=int(input())

for i range(101):
  for j in range(101):
    if 4*i + 7*j == N:
      print('Yes')
      sys.exit()
else:
  print('No')

Fixed code:
import sys
 
N=int(input())
 
for i in range(101):
  for j in range(101):
    if 4*i + 7*j == N:
      print('Yes')
      sys.exit()
else:
  print('No')
Buggy code:
N=int(input())
a='No'
for i in range(14):
  if (N-i*7)%4==0:
    a='Yes'
    break
print(a)

Fixed code:
N=int(input())
a='No'
for i in range(14):
  if N<0:
    break
  if N%4==0:
    a='Yes'
    break
  N-=7
print(a)
Buggy code:
n = int(input())
a = n // 4
res = 0
for i in range(a+1):
  N = 4*i
  if N % 7 == 0:
    res += 1

b = n//7    
for i in range(b+1):
  M = 7*i
  if M % 7 == 0:
    res += 1  
    
if res == 0 or n == 0:
  print("No")
else:
  print("Yes")

Fixed code:
n = int(input())
a = n // 4
res = 0
for i in range(a+1):
  N = 4*i
  if (n-N) % 7 == 0:
    res += 1

b = n//7    
for i in range(b+1):
  M = 7*i
  if (n-M) % 7 == 0:
    res += 1  
    
if res == 0 or n == 0:
  print("No")
else:
  print("Yes")
Buggy code:
import sys
n = int(input())
for i in range(26):
  if (n - 4 * i ) % 7:
    continue
  else:
    print("Yes")
    sys.exit()
print("No")

Fixed code:
import sys
n = int(input())
for i in range(26):
  if (n - 4 * i ) % 7 or n - 4 * i < 0:
    continue
  else:
    print("Yes")
    sys.exit()
print("No")
Buggy code:
n = int(input())
p = 0
for i in range(26)
  for j in range(16)
    if 4*i + 7*j == n:
      p == 1
      break
if p == 0:
  print("No")
else: 
  print("Yes")

Fixed code:
n = int(input())
p = 0
for i in range(26):
  for j in range(16):
    if 4*i + 7*j == n:
      p = 1
      break
if p == 0:
  print("No")
else: 
  print("Yes")
Buggy code:
n = int(input())
for i in range(26):
    if (n - 4 * i) % 7 == 0:
        print("Yes")
        exit()
print("No")

Fixed code:
n = int(input())
for i in range(26):
    if n - 4 * i < 0:
        break
    if (n - 4 * i) % 7 == 0:
        print("Yes")
        exit()
print("No")
Buggy code:
n = int(input())

c = 0

ans = 'No'
for i in range(15):
    for i in range(26):
        c = 4 * j + 7 * i
    if n == c:
        ans = 'Yes'

print(ans)

Fixed code:
n = int(input())

c = 0

ans = 'No'

for i in range(15):
    for j in range(26):
        c = 4 * j + 7 * i
        if n == c:
            ans = 'Yes'
            break
print(ans)
Buggy code:
N = int(input())

flag = False

for i in range(14+1):
    for j in range(25+1):
        if N == (7*i + 4*j):
            print('Yes')
            flag = True
            break

if flag == False:
    print('No')


Fixed code:
N = int(input())

flag = False

for i in range(14+1):
    for j in range(25+1):
        if N == (7*i + 4*j):
            if flag == False:
                print('Yes')
                flag = True
            break

if flag == False:
    print('No')
Buggy code:
price = int(input())

top = price//4
for n in range(top):
  for m in range(top):
    if 4*n + 7*m == price:
      flag = 1
      break

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


Fixed code:
price = int(input())

flag = 0
top = price//4 + 1
for n in range(top+1):
  for m in range(top+1):
    if 4*n + 7*m == price:
      flag = 1
      break

if flag == 1:
  print('Yes')
else:
  print('No')
Buggy code:
N = int(intput())
l=[]

for i in range(26):
    for j in range(16):
        l.append(i*4+j*7):

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

Fixed code:
N = int(input())
l=[]

for i in range(26):
    for j in range(16):
        l.append(i*4+j*7)

if N in l:
    print('Yes')
else:
    print('No')
Buggy code:
N = int(input())
flg = 0
for i in range(N//4):
    for j in range(N//7):
        if N == 4 * i + 7 * j:
            flg = 1
if flg == 1:
    print('Yes')
else:
    print('No')

Fixed code:
N = int(input())
flg = 0
for i in range(N//4 + 1):
    for j in range(N//7 + 1):
        if N == 4 * i + 7 * j:
            flg = 1
if flg == 1:
    print('Yes')
else:
    print('No')
Buggy code:
def main(N):
  
    CP = 4
    DP = 7
    
    if N <= 3:
        return "No"
    
    for i in range(100):
        for j in range(100):
            if (CP * i + DP * j) == N:
                print(i,j)
                return "Yes"
    return "No"

N = int(input())
print(main(N))


Fixed code:
def main(N):
  
    CP = 4
    DP = 7
    
    if N <= 3:
        return "No"
    
    for i in range(100):
        for j in range(100):
            if (CP * i + DP * j) == N:
                return "Yes"
    return "No"
N = int(input())
print(main(N))
Buggy code:
N = int(input())
answer = "No"
cake = N//4 + 1
nut = N//7 + 1

for x in range(cake):
  for y in range(nut):
    if 4*x + 7*y == N:
      answer = "Yes"

Fixed code:
N = int(input())
answer = "No"
cake = N//4
nut = N//7

for x in range(cake+1):
  for y in range(nut+1):
    if 4*x + 7*y == N:
      answer = "Yes"

print(answer)
Buggy code:
n = int(input())
a = 0
while n >= 0:
    if n % 7 == 0:
        a += 1
    n -= 4
if a == 1:
    print("Yes")
else:
    print("No")

Fixed code:
n = int(input())
a = 0
while n >= 0:
    if n % 7 == 0:
        a += 1
        break
    n -= 4
if a == 1:
    print("Yes")
else:
    print("No")
Buggy code:
n=int(input())
flag=0
for i in range(int(n//4)):
  for j in range(int(n//7)):
    if n==i*4+j*7:
      print("Yes")
      flag=1
      break
if flag==0:
  print("No")

Fixed code:
n=int(input())
flag=0
for i in range(int(n//4)+1):
  for j in range(int(n//7)+1):
    if n==(i*4+j*7):
      print("Yes")
      flag=1
      break
  if flag==1:
    break
if flag==0:
  print("No")
Buggy code:
n = int(input())
ans =0
for i in range(n):
  for j in range(n):
    if 4*i + 7*j !=n:
      ans =1
    else:
      ans =0
print('Yes' if ans ==1 else 'No')

Fixed code:
n = int(input())
ans =0
for i in range(100):
  for j in range(100):
    if n == 4*i + 7 *j:
      ans =1
print('Yes' if ans ==1 else 'No')
Buggy code:
n = int(input())
count = 0
for cake in range(0,n+1,4):
    for donatsu in range(0,n+1,7):
        print("Yes") if cake+donatsu == n else print("No")


Fixed code:
n = int(input())
count = 0
for cake in range(0,n+1,4):
    for donatsu in range(0,n+1,7):
        if donatsu + cake == n:
            count += 1
print("Yes") if count >= 1 else print("No")
Buggy code:
N = int(input())

for i in range(25)
    for j in range(15)
        if N == 4*i + 7*j:
            print('Yes')
            break

print('No')


Fixed code:
N = int(input())

for i in range(25):
    for j in range(15):
        if N == 4*i + 7*j:
            print('Yes')
            exit()

print('No')
Buggy code:
n = int(input())

for i in range(n//4):
    for j in range(n//7):
        if 4*i + 7*j == n:
            print('Yes')
            exit()

print('No')

Fixed code:
n = int(input())

for i in range((n//4)+1):
  for j in range((n//7)+1):
    if (4*i)+(7*j) == n:
      print("Yes")
      exit()

print("No")
Buggy code:
N = int(input())
flg = 0

for i in range(N//7):
  for j in range(N//4):
    money = 7*i + 4*j
    if money == N:
      flg = 1
      break
      
if flg == 1:
  print('Yes')
else:
  print('No')

Fixed code:
N = int(input())
flg = 0

for i in range(N//7+1):
    for j in range(N//4+1):
        money = 7*i + 4*j
        if money == N:
            flg = 1
            break
      
if flg == 1:
  print('Yes')
else:
  print('No')
Buggy code:
n = int(input())
a = n//4
b = n//7
cnt = 0
flg = 0
for i in range(a+1):
    for j in range(b+1):
        if 4*i+7*j == n:
            flg = 1
            exit()
print('Yes' if flg==1 else 'No')        

Fixed code:
n = int(input())
a = n//4
b = n//7
cnt = 0
flg = 0
for i in range(a+1):
    for j in range(b+1):
        if 4*i+7*j == n:
            flg = 1
            
print('Yes' if flg==1 else 'No')
Buggy code:
n = int(input())
for f in range(100//4+1):
	for s in range(100//7+1):
    	ans = f*4 + s*7
        if ans == n:
        	print("Yes")
			exit()
print("No")

Fixed code:
n = int(input())
for f in range(100//4+1):
	for s in range(100//7+1):
		ans = f*4 + s*7
		if ans == n:
			print("Yes")
			exit()
print("No")
Buggy code:
n = int(input())
for i in range(n//7 + 1):
    if (n - 7*x) % 4 == 0:
        print('Yes')
        exit()
print('No')

Fixed code:
n = int(input())
for i in range(n//7 + 1):
    if (n - 7*i) % 4 == 0:
        print('Yes')
        exit()
print('No')
Buggy code:
N = int(input())

list_aaa =[]

for i in range(26):
    for j in range(26):
        list_aaa.append((i*4)+(j*7))
list_aaa = sorted(list_aaa)

print(list_aaa)

if N in list_aaa:
    print("Yes")
else:
    print("No")

Fixed code:
N = int(input())

list_aaa =[]

for i in range(26):
    for j in range(26):
        list_aaa.append((i*4)+(j*7))
list_aaa = sorted(list_aaa)

# print(list_aaa)

if N in list_aaa:
    print("Yes")
else:
    print("No")
Buggy code:


def main():


    N = int(input())

    for i in range(int(N/4)):
        for j in range(int(N/7)):
            if i*4+j*7==N:
                print('Yes')
                exit()
    
    print('No')


    
if __name__== "__main__":
    main() 











Fixed code:


def main():

    
    N = int(input())

    for i in range(N//4+1):
        for j in range(N//7+1):
            if i*4+j*7==N:
                print('Yes')
                exit()
    print('No')


if __name__== "__main__":
    main()
Buggy code:
N = int(input())
flag = False
for a in range(N//7):
    for b in range((N - 7*a)//4):
        if(N == 7*a + 4*b):
           flag = True
           break;
if(flag):
    print("Yes")
else:
    print("No")



Fixed code:
N = int(input())
flag = False
for a in range(N//7+1):
    for b in range((N - 7*a)//4+1):
        if(N == 7*a + 4*b):
           flag = True
           break;
if(flag):
    print("Yes")
else:
    print("No")
Buggy code:
n = int(input())
a = n // 7
b = 0
for i in range(a+1):
    if (n - (7 * i) / 4) % 1 == 0:
        print("Yes")
        b = 1
        break
if b == 0 : print("No")

Fixed code:
n = int(input())
x = n // 7
b = 1
for i in range(x+1):
    if (n - (7 * i)) % 4 == 0:
        print("Yes")
        b = 0
        break
if b:print("No")
Buggy code:
four_w = []
seven_w = []
cross = []

for i in range(1,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in four_w,seven_w,cross:
    print("Yes")
else:
    print("No")

Fixed code:
four_w = []
seven_w = []
cross = []

for i in range(1,101):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in cross:
    print("Yes")
elif n in seven_w:
    print("Yes")
elif n in four_w:
    print("Yes")
else:
    print("No")
Buggy code:
n = int(input())
if n < 4:
    print('No')
else:
    m = n % 4
    if m == 0 or n >= (4 - m) * 7:
        print(n, 'Yes')
    else:
        print('No')


Fixed code:
n = int(input())
if n < 4:
    print('No')
else:
    m = n % 4
    if m == 0 or n >= (4 - m) * 7:
        print('Yes')
    else:
        print('No')
Buggy code:
import math
a=int(input())
b_4 = math.ceil(a/4)
b_7 = math.ceil(a/7)

count =0
for i in range(b_4+1):
    for j in range(b_7+1):
        
        if (4*i+j*7) == a:
            count += 1

if count==1:
    print('Yes')
else:
    print('No')

Fixed code:
import math
a=int(input())
b_4 = math.ceil(a/4)
b_7 = math.ceil(a/7)

count =0
for i in range(b_4+1):
    for j in range(b_7+1):
        
        if (4*i+j*7) == a:
            count += 1
            break

if count>=1:
    print('Yes')
else:
    print('No')
Buggy code:
n = int(input())
c = 0
for i in range(n):
    for j in range(n):
        if 4*i + 7*j == n:
            c += 1
if c ==1:
    print("Yes")
else:
    print("No")

Fixed code:
n = int(input())
c = 0
for i in range(n):
    for j in range(n):
        if 4*i + 7*j == n:
            c = 1
if c == 1:
    print("Yes")
else:
    print("No")
Buggy code:
a = int(input())
for i in range(0,26):
  for j in range(0,15):
    if a==(i*4+j*7):
      print("Yes")
print("No")

Fixed code:
a = int(input())
for i in range(0,26):
  for j in range(0,15):
    if a==(i*4+j*7):
      print("Yes")
      exit()
print("No")
Buggy code:
n=int(input())
for i in range(n//7):
    for j in range(n//4):
        if 7*i+4*j==n:
            print("Yes")
            exit()
print("No")

Fixed code:
n=int(input())
for i in range(n//7+1):
    for j in range(n//4+1):
        if 7*i+4*j==n:
            print("Yes")
            exit()
print("No")
Buggy code:
import sys

n = int(input())

for i in range(n // 7):
    if (n - 7 * i) % 4 == 0:
        print("Yes")
        sys.exit()
print("No")


Fixed code:
import sys

n = int(input())

for i in range(n // 7 + 1):
    if (n - 7 * i) % 4 == 0:
        print("Yes")
        sys.exit()
print("No")
Buggy code:
N = int(input())

while N > 0:
    if N%7 == 0 or N%4 == 0:
        print('yes')
        break
    N -= 4

else :
    print('No')

Fixed code:
N = int(input())

while N > 0:
    if N%7 == 0 or N%4 == 0:
        print('Yes')
        break
    N -= 4

else :
    print('No')
Buggy code:
n = int(input())

for i in range((n//4)+1):
    for j in range((n//7)+1):
        if (i*4) + (i*7) == n:
            print("Yes")
            exit()
print("No")

Fixed code:
n = int(input())

fo = n // 4
se = n // 7

for i in range(fo+1):
    for j in range(se+1):
        if ((i*4) + (j*7)) == n:
            print("Yes")
            exit()
print("No")
Buggy code:
N = int(input())
donuts = 7
cakes = 4
answer = 0
def calc1():
  for a in range(0,26):
    for b in range(0,26):
      if donuts * a + cakes * b == N:
        return 'Yes'
      elif donuts * a + cakes * b  > N:
        break
  return 'No'

calc1()

Fixed code:
N = int(input())
donuts = 7
cakes = 4
answer = 0
def calc1():
  for a in range(0,26):
    for b in range(0,26):
      if donuts * a + cakes * b == N:
        return 'Yes'
      elif donuts * a + cakes * b  > N:
        break
  return 'No'

print(calc1())
Buggy code:
n = int(input())
x = 1+n//4
q = ['No','Yes']
s = 0
for a in range(x):
	if (n-a*4)%7==0:
    	s = 1
        
print(q[s])

Fixed code:
n = int(input())
x = 1+n//4
q = ['No','Yes']
s = 0
for a in range(x):
  if (n-a*4)%7==0:
    s += 1
    break
        
print(q[s])
Buggy code:
N = int(input())
a = N//7
b = N//4
for i in range(a):
    for j in range(b):
        if 7*i+4*j == N:
            print('Yes')
            exit()
print('No')

Fixed code:
N = int(input())
a = N//7
b = N//4
for i in range(a+1):
    for j in range(b+1):
        if 7*i+4*j == N:
            print('Yes')
            exit()
print('No')
Buggy code:
n = int(input())
cnt = 0
for i in range(26):
    for j in range(16):
        if i * j == n:
            cnt += 1
if cnt >= 1:
    print("Yes")
else:
    print("No")

Fixed code:
n = int(input())
cnt = 0
for i in range(26):
    for j in range(16):
        if 4 *i + 7 * j == n:
            cnt += 1
            
if cnt >= 1:
    print("Yes")
else:
    print("No")
Buggy code:
N = int(input())
maxcake = N // 4
maxdonut = N //7
for i in range(maxcake):
    for j in range(maxdonut):
        if i*4 + j*7 == N:
            print("Yes")
            exit()
print("No")

Fixed code:
N = int(input())
maxcake = N // 4 +1
maxdonut = N //7 +1
for i in range(maxcake):
    for j in range(maxdonut):
        if i*4 + j*7 == N:
            print("Yes")
            exit()
print("No")
Buggy code:
n=int(input())
res="No"
for i in range (n):
    if (n-7*i)%4==0 and n-7*i>=0:
        res="Yes"
        print(i)
print(res)

Fixed code:
n=int(input())
res="No"
for i in range (n):
    if (n-7*i)%4==0 and n-7*i>=0 and int((n-7*i)/4>=0):
        res="Yes"
print(res)
Buggy code:
n = int(input())

cnt =0

for i in range(26):
    for j in range(15):
        if i * 4 + j * 7 == n:
            cnt +=1
            if cnt >0:
                print('Yes')
                break
            else:
                print('No')

Fixed code:
n = int(input())
 
cnt =0
 
for i in range(26):
    for j in range(15):
        if i * 4 + j * 7 == n:
            cnt +=1
if cnt >0:
    print('Yes')
else:
    print('No')
Buggy code:
def calc(a):
  a = int(input())
  for a4 in range(26):
    for a7 in range(16):
      if a4*4+a7*7 is a:
        return "Yes"
  return "No"

if __name__ == '__main__':
  calc(int(input())
      

Fixed code:
def calc(a):
  for a4 in range(26):
    for a7 in range(16):
      if a4*4+a7*7 == a:
        return "Yes"
  return "No"

if __name__ == '__main__':
  print(calc(int(input())))
Buggy code:
#!/usr/bin/env python
N = int(input())

print(N//4 + 1)
for i in range(N//4 + 1):
    if (N - 4*i) % 7 == 0:
        print('Yes')
        break
else:
    print('No')

Fixed code:
#!/usr/bin/env python
N = int(input())

for i in range(N//4 + 1):
    if (N - 4*i) % 7 == 0:
        print('Yes')
        break
else:
    print('No')
Buggy code:
import math
n=int(input())
for a in range(math.floor(n/4)+1):
    if (n-a*4)%7==0:
        print("Yes")
        break
print("No")


Fixed code:
import math
n=int(input())
for a in range(math.floor(n/4)+1):
    if (n-a*4)%7==0:
        print("Yes")
        quit()
print("No")
Buggy code:
n = int(input())
flag = False
for n in range(0,25):
    for i in range(0,15):
        if n * 4 + i*7 ==n and n !=0 or i != 0:
            flag = True
if flag :
    print("Yes")
else :
    print("No")

Fixed code:
n = int(input())
flag = False
for t in range(0,25):
    for i in range(0,15):
        if t !=0 or i != 0:
            if t*4 + i*7==n:
                flag = True
if flag :
    print("Yes")
else :
    print("No")
Buggy code:
n=int(input())

for i in range(20):
  if (n-7*i)%4==0:
    print("Yes")
    break
  elif (n-7*i)<0:
    print("No")
    break

Fixed code:
n=int(input())

for i in range(20):
  if (n-7*i)<0:
    print("No")
    break
  elif (n-7*i)%4==0:
    print("Yes")
    break
Buggy code:
n = int(input())
flag = False
for a in range(n//4+1):
    for b in range(n//7+1):
        
        if 4*a + 7*b == n:
            print(a,b)
            flag = True
            break

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

Fixed code:
n = int(input())
flag = False
for a in range(n//4+1):
    for b in range(n//7+1):
        
        if 4*a + 7*b == n:
            
            flag = True
            break

if flag:
    print("Yes")
else:
    print("No")
Buggy code:
n=int(input())
for i in range((n//4)+1):
  for j in range((n//7)+1):
    if n==4*i+7*j:
      print('Yes')
    else:
      print('No')
      

Fixed code:
n=int(input())
res=0
for i in range((n//4)+1):
  for j in range((n//7)+1):
    if n==4*i+7*j:
      res=1
if res==1:
  print('Yes')
else:
  print('No')
Buggy code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    flg=0
    for i in range(n//7):
        if (n-i*7)%4==0:
            flg=1
    if flg==1:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Fixed code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    flg=0
    for i in range(n//7+1):
        if (n-i*7)%4==0:
            flg=1
    if flg==1:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()
Buggy code:
n = int(input())
flag = False
for i in range(int(n/4)):
    for j in range(int(n/7)):
        if i==0 and j==0:
            continue
        if n%((4*i)+(7*j)) == 0:
            flag = True
            break
if flag:
    print("Yes")
else:
    print("No")

Fixed code:
n = int(input())
flag = False
for i in range(int(n/4)+1):
    for j in range(int(n/7)+1):
        if i==0 and j==0:
            continue
        if n%((4*i)+(7*j)) == 0:
            flag = True
            break
if flag:
    print("Yes")
else:
    print("No")
Buggy code:
N=int(input())

for i in range(30):
    for j in range(30-i):
        if (4*i)+(7*j) == N:
            print('Yes')


Fixed code:
N=int(input())

for i in range(30):
    for j in range(30-i):
        if (4*i)+(7*j) == N:
            print('Yes')
            exit()
print('No')