qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N = int(input())
X = N // 4
Z = N // 7
Y = sum(4*a + 7*b == N for a in range(X) for b in range(Z))
if (Y != 0):
  print("Yes")
else:
  print("No")

Fixed code:
N = int(input())
X = N // 4 + 1
Z = N // 7 + 1
Y = sum(4*a + 7*b == N for a in range(X) for b in range(Z))
if (Y != 0):
  print("Yes")
else:
  print("No")
Buggy code:
n=int(input())
ans="No"
for i in range(n//7+1):
  if (n-7+i)%4==0:
    ans="Yes"
    
print(ans)

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

is_buy = 'No'
for a in range(N//4):
    for b in range(N//7):
        if 4*a + 7*b == N:
            is_buy = 'Yes'
            break
print(is_buy)

Fixed code:
N=int(input())

is_buy = 'No'
for a in range((N//4)+1):
    for b in range((N//7)+1):
        if 4*a + 7*b == N:
            is_buy = 'Yes'
            break
print(is_buy)
Buggy code:
n = input()
N = int(n)

for x in range(25):
	for y in range(14):
		a = 4*x + 7*y

		if a == N:
			print("Yes")
			break
else:
	print("No")

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

for x in range(25):
	for y in range(14):
		a = 4*x + 7*y
		if a == N:
			print("Yes")
			break
	else:
		continue
	break
else:
	print("No")
Buggy code:
N=int(input())
for i in range(26):
    if (N-i*4)%7==0:
        print("Yes")
        exit()
print("No")

Fixed code:
N=int(input())
for i in range(26):
    if (N-i*4)%7==0 and N-i*4>=0:
        print("Yes")
        exit()
            
print("No")
Buggy code:
def main():
  N = int(input())

  for i range(26):
    if i * 4 > N:
      break
    if (N - i * 4) % 7 == 0:
      print('Yes')
      return
  print('No')

if __name__ == '__main__':
  main()
  

Fixed code:
def main():
  N = int(input())

  for i in range(26):
    if i * 4 > N:
      break
    if (N - i * 4) % 7 == 0:
      print('Yes')
      return
  print('No')

if __name__ == '__main__':
  main()
Buggy code:
n = int(input())
xm = n//4
ym = n//7
for x in range(xm+1):
    for y in range(ym+1):
        if 4*x+7*y == n:
            print('Yes')
            exit()

Fixed code:
n = int(input())
xm = n//4
ym = n//7
for x in range(xm+1):
    for y in range(ym+1):
        if 4*x+7*y == n:
            print('Yes')
            exit()
print('No')
Buggy code:
N = int(input())
ans = 0
​
for i in range(1,26):
  for j in range(1,15):
    n = 4*i + 7*j
    if n == N:
      ans = 1
      break
      
if ans == 1:
  print("Yes")
else:
  print("No")

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

for i in range(26):
  for j in range(15):
    n = 4*i + 7*j
    if n == N:
      ans = 1
      break
  if ans == 1:
    break

if ans == 1:
  print("Yes")
else:
  print("No")
Buggy code:
N = int(input())

M=N//7

flag=0
for i in range(M):
  #print(N-i)
  if (N-i*7)%4==0:
    flag=1
    break
else:
  if N==4 or N==7:
    flag=1

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

Fixed code:
N = int(input())

M=N//7

flag=0
for i in range(M+1):
  #print(N-i*7)
  if (N-i*7)%4==0:
    flag=1
    break
else:
  if N==4 or N==7:
    flag=1

print('Yes' if flag==1 else 'No')
Buggy code:
import sys
n = int(input()) 
i = 0 
j = 0
while(i < 100):
    while(j < 100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()
        j+= 1
        i+= 1

print("No")


Fixed code:
import sys
n = int(input()) 
i = 0 
j = 0
while(i < 100):
    j = 0
    while(j < 100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()
        j+= 1
        
    i+= 1

print("No")
Buggy code:
n=int(input())
swi = "No"
for a in range(100)
  if (n - 4＊a) % 7 == 0 and n - 4＊a >= 0:
    swi="Yes"
    break
print(swi)
    
    

Fixed code:
n = int(input())
swi = "No"
for a in range(100):
    if (n - 4*a) % 7 == 0 and n - 4*a >= 0:
        swi = "Yes"
        break
print(swi)
Buggy code:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake*i + donut*j):
            ac == True
            break
if ac:
    print('Yes')
else:
    print('No')

Fixed code:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake*i + donut*j):
            ac = True
            break
if ac:
    print('Yes')
else:
    print('No')
Buggy code:
N = int(input())
for i in range(0, 101):
  for j in range(0, 101):
    if i * 4 + j * 7 = N:
      print("Yes")
      exit()
print("No")

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

if a <= 3:
  print("No")
else:
  while a >= 0:
    if a % 4 == 0:
      print("YES")
      break
    else:
      a -= 7
  print("No")

Fixed code:
a = int(input())

if a <= 3:
  print("No")
else:
  while a >= 0:
    if a % 4 == 0:
      print("Yes")
      break
    else:
      a -= 7
  else:
    print("No")
Buggy code:
N=input()
N=int(N)
if N<3 :
    print('No')
elif N%4 == 0:
    print('Yes')
elif N%7==0 :
    print('Yes')
elif (N-7)%4==0:
    print('Yes')
elif (N-14)%4==0:
    print('Yes')
elif (N-21)%4==0:
    print('Yes')
else :
    print('No')


Fixed code:
N=input()
N=int(N)
if N<=3 :
    print('No')
elif N%4 == 0:
    print('Yes')
elif N%7==0 :
    print('Yes')
elif (N-7)%4==0 and N-7>=0:
    print('Yes')
elif (N-14)%4==0 and N-14>=0:
    print('Yes')
elif (N-21)%4==0 and N-21>=0:
    print('Yes')
else :
    print('No')
Buggy code:
import sys
N = int(input())
for i in range(int(N/4)):
    amount = i * 4
    for j in range(int(N/7)):
        if(j == 0):
            pass
        else:
            amount += 7
        if(amount == N):
            print('Yes')
            sys.exit()
print('No')


Fixed code:
import sys
N = int(input())
for i in range(int(N/4) + 1):
    amount = i * 4
    for j in range(int(N/7) + 1):
        if(j == 0):
            pass
        else:
            amount += 7
        if(amount == N):
            print('Yes')
            sys.exit()
print('No')
Buggy code:
N = int(input())
for i in range(0,26):
  for k in range(0,15):
    if N == 4*i + 7*k:
      print('Yes, i=',i,', k=',k)
      exit()
print('No')

Fixed code:
N = int(input())
for i in range(0,26):
  for k in range(0,15):
    if N == 4*i + 7*k:
      print('Yes')
      exit()
print('No')
Buggy code:
A = int(input())
Flag = False
for i in range(1,(A//4)+1):
  for j in range(1,(A//7)+1):
    if A == 3:
      break;
    elif 4*i + 7*1 == A:
      Flag = True
if Flag:
  print('Yes')
else:
  print('No')

Fixed code:
A = int(input())
Flag = False
for i in range((A//4)+1):
  for j in range((A//7)+1):
    if A == 3:
      break;
    elif 4*i + 7*j == A:
      Flag = True
if Flag:
  print('Yes')
else:
  print('No')
Buggy code:
A = int(input())
Flag = False
for i in range((A//4)+1):
  for j in range((A//7)+1):
    if 4*i + 7*1 == A:
      Flag = True
if Flag:
  print('Yes')
else:
  print('No')

Fixed code:
A = int(input())
Flag = False
for i in range((A//4)+1):
  for j in range((A//7)+1):
    if 4*i + 7*j == A:
      Flag = True
if Flag:
  print('Yes')
else:
  print('No')
Buggy code:
price = int(input())
cnt = 0

for i in range(26):
    for j in range(17):
        z = price - (4*i + 7*j)
        if z == 0:
            cnt += 1
            break

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


Fixed code:
price = int(input())
cnt = 0

for i in range(26):
    for j in range(17):
        z = price - (4*i + 7*j)
        if z == 0:
            cnt += 1

if cnt >= 1:
    print('Yes')
else:
    print('No')
Buggy code:
N = int(input())

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

print('No')

Fixed code:
N = int(input())

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

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

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

for a in range(cake):
  for b in range(donut):
    total = a*4 + b*7
    if total == X:
      ans += 1
      
if ans >= 1:      
  print("Yes")
else:
  print("No")

Fixed code:
X = int(input())
ans = 0
cake = int(X/4)
donut = int(X/7)

for a in range(cake+1):
  for b in range(donut+1):
    total = a*4 + b*7
    if total == X:
      ans = 1

if ans >= 1:      
  print("Yes")
else:
  print("No")
Buggy code:
n=int(input())
for i in range(100):
  for j in range(100):
    if n == i*4 +j*7:
      print("Yes")
      break
else:
  print("No")

Fixed code:
n=int(input())
for i in range(100):
  for j in range(100):
    if n == i*4 +j*7:
      print("Yes")
      exit()
else:
  print("No")
Buggy code:
import math
N = int(input())
a = math.floor(N / 4)
b = math.floor(N / 7)
ans = "No"
for i in range(a):
  for j in range(b):
    if i * 4 + j * 7 == N:
      ans = "Yes"
      break
  else:
    continue
  break
print(ans)

Fixed code:
import math
N = int(input())
a = math.floor(N / 4)
b = math.floor(N / 7)
ans = "No"
for i in range(a + 1):
  for j in range(b + 1):
    if i * 4 + j * 7 == N:
      ans = "Yes"
      break
  else:
    continue
  break
print(ans)
Buggy code:
n = int(input())
cnt = 0
for i in range(int((100 + 4) / 4)):
    for j in range(int((100 + 7) / 7)):
        if i * 4 + j * 7 == n:
            cnt += 1
if cnt > 0:
    print(cnt)
else:
    print("No")


Fixed code:
n = int(input())
cnt = 0
for i in range(int((100 + 4) / 4)):
    for j in range(int((100 + 7) / 7)):
        if i * 4 + j * 7 == n:
            cnt += 1
if cnt > 0:
    print("Yes")
else:
    print("No")
Buggy code:
n = int(input())
print('YES' if n in [7,14,4,11,8,15,12,16] or n > 17 else 'No')

Fixed code:
n = int(input())
print('Yes' if n in [7,14,4,11,8,15,12,16] or n > 17 else 'No')
Buggy code:
N = int(input())
cake = N // 4
donuts = N // 7
calcs = False
for i in range(cake + 1):
  for j in range(donuts + 1):
    if i * 4 + j * 7 == N:
      calcs = True
      break
print('Yes' if calcs is True else False)

Fixed code:
N = int(input())
cake = N // 4
donuts = N // 7
calcs = False
for i in range(cake + 1):
  for j in range(donuts + 1):
    s = i * 4 + j * 7
    if s == N:
      calcs = True
      break
print('Yes' if calcs is True else '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())
for cake in range(n):
    for donut in range(n):
        if cake * 4 + donut * 7 == n:
            print("Yes")
            break
else:
    print("No")


Fixed code:
n = int(input())
for cake in range(n):
    for donut in range(n):
        if cake * 4 + donut * 7 == n:
            print("Yes")
            break
    else:
        continue
    break
else:
    print("No")
Buggy code:
N = int(input())
k = 0

for i in range(0, 26, 1):
  for j in range(0, 16, 1):
    if i * 4 + j * 7 == N:
      print('Yes')
      k = 1
      break
else:
  if k != 1:
    print('No')

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

for i in range(0, 26, 1):
  for j in range(0, 16, 1):
    if i * 4 + j * 7 == N:
      print('Yes')
      k = 1
      break
  if k == 1:
    break
else:
  if k != 1:
    print('No')
Buggy code:
N = int(input())
res = 'No'
for i in range(int(100/7)+1):
	for j in range(int(100/4)+1):
		a = i*7 + j*4
		if int(N) == a:
			print('Yes')
print(res)


Fixed code:
N = int(input())
res = 'No'
for i in range(int(100/7)+1):
	for j in range(int(100/4)+1):
		a = i*7 + j*4
		if int(N) == a:
			res='Yes'
print(res)
Buggy code:
import sys

N = int(input())

for i in range(N+1):
    for j in range(N+1):
        if N == 4*i+7*j:
            print ("Yes")
            sys.exit()
    
print("N0")

Fixed code:
import sys

N = int(input())

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

Fixed code:
n= int(input())
if 4*(2*n//7) -n>=0:
    print("Yes")
else:
    print("No")
Buggy code:
N = int(input())
n = N//7
flag = 0
for i in range(n):
    p = N - n*7
    if(p%4 == 0):
        flag = 1
        break
if(flag==1):
    print('Yes')
else:
    print('No')

Fixed code:
N = int(input())
n = N//7
flag = 0
for i in range(n+1):
    p = N - i*7
    if(p%4 == 0):
        flag = 1
        break
if(flag==1):
    print('Yes')
else:
    print('No')
Buggy code:
x=int(input())
t=0
while x>=0:
  if x%7==0:
    t=1
  x-=4
if t==0:
  print('No')
else: print('yes')

Fixed code:
x=int(input())
t=0
while x>=0:
  if x%7==0:
    t=1
  x-=4
if t==0:
  print('No')
else: print('Yes')
Buggy code:
n=int(input())
keep=0
for i in range(0,30):
  for j in range(0,30):
    if i*4+j+7==30:
      keep=1
if keep==1:
  print("Yes")
else:
  print("No")

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

torf = False

for i in range(0, n//4 + 1):
    print(n-i*4)
    if (n - i * 4) % 7 == 0:
        torf = True
        break
        
if torf:
    print("Yes")
else :
    print("No")



Fixed code:
n = int(input())

torf = False

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

print('No')

Fixed code:
n = int(input())
for i in range(26):
    for j in range(16):
        if i*4 + j*7 == n:
            print('Yes')
            exit()

print('No')
Buggy code:
n=int(input())
exist=False
for i in range(n):
  for j in range(n):
    if 4*i+7*j==n:
      print("Yes")
      exist=True
      break
if not exist:
  print("No")

Fixed code:
n=int(input())
exist=False
for i in range(n):
  for j in range(n):
    if 4*i+7*j==n:
      print("Yes")
      exist=True
    if exist:
      break
  if exist:
    break
if not exist:
  print("No")
Buggy code:
# ABC105 B - Cakes and Donuts
n = int(input())
 
count = 0
 
for x in range(0,n):
    for y in range(0,n):
        if x*4 + y*7 == n:
            count += 1

print("no") if count == 0 else print("Yes")

Fixed code:
# ABC105 B - Cakes and Donuts
n = int(input())
 
count = 0

for x in range(0,n):
    for y in range(0,n):
        if x*4 + y*7 == n:
            count += 1

print("No") if count == 0 else print("Yes")
Buggy code:
N = int(input())
key = 0
for i in range(int(N / 4)):
    if (N - 4 * N) % 7 == 0:
        key = 1
        break
if key == 1:
    print("Yes")
else:
    print("No")


Fixed code:
N = int(input())
key = 0
for i in range(int(N / 4) + 1):
    if (N - 4 * i) % 7 == 0:
        key = 1
        break
if key == 1:
    print("Yes")
else:
    print("No")
Buggy code:
n=int(input())
a=[]
for x in range(15):
    for y in range(26):
        a.append(x*7+y*4)
if not n in a:
    print("No")
else:
    print("Yes)

Fixed code:
n=int(input())
a=[]
for x in range(15):
    for y in range(26):
        a.append(x*7+y*4)
if not n in a:
    print("No")
else:
    print("Yes")
Buggy code:
N = int(input())
fmax = int(N/4)
smax = int(N/7)
for i in range(fmax +1):
  for j in range(smax + 1):
	if 4*i + 7*j == N:
	  print("Yes")
	  exit()
print("No")


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


CAKE = 4
DOUNAT = 7


def check_amount(i, j, n):
    return i*4 + j*7 == n


n = int(input())
count = 0
for i in range(int(n/CAKE+1)):
    for j in range(int(n/DOUNAT+1)):
        print(i, j)
        if check_amount(i, j, n):
            print('Yes')
            sys.exit()
print('No')

Fixed code:
import sys


CAKE = 4
DOUNAT = 7


def check_amount(i, j, n):
    return i*4 + j*7 == n


n = int(input())
count = 0
for i in range(int(n/CAKE+1)):
    for j in range(int(n/DOUNAT+1)):
        if check_amount(i, j, n):
            print('Yes')
            sys.exit()
print('No')
Buggy code:
PRICE_CAKE = 4
PRICE_DOUGHNUT = 7

n = int(input())
max_cakes = n // PRICE_CAKES

valid = False
for i in range(max_cakes + 1):
  n_left = n - i * PRICE_CAKE
  if n_left % PRICE_DOUGHNUT == 0:
    valid = True
    break
    
print("Yes" if valid else "No")

Fixed code:
PRICE_CAKE = 4
PRICE_DOUGHNUT = 7

n = int(input())
max_cakes = n // PRICE_CAKE

valid = False
for i in range(max_cakes + 1):
  n_left = n - i * PRICE_CAKE
  if n_left % PRICE_DOUGHNUT == 0:
    valid = True
    break
    
print("Yes" if valid else "No")
Buggy code:
n = int(input())
for i in range(n // 4 + 1):
    if (n - 4 * i) % 7 == 0:
        print('Yes')
print('No')


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

def func(n):
    for k in range(N//4):
        for d in range(N//7):
            if 4 * k + 7 * d == N:
                return 'Yes'
    return 'No'

print(func(N))

Fixed code:
N = int(input())

def func(n):
    for k in range(N//4 + 1):
        for d in range(N//7 + 1):
            if 4 * k + 7 * d == N:
                return 'Yes'
    return 'No'

print(func(N))
Buggy code:
n = int(input())
x = 100//7+2
for i in range(x):
    for j in range(x):
        if 4*i+7*j == n:
            print("Yes")
            break
    else:
        continue
    break

Fixed code:
n = int(input())
x = 100//7+2
for i in range(x):
    for j in range(x):
        if 4*i+7*j == n:
            print("Yes")
            break
    else:
        continue
    break
else:
    print('No')
Buggy code:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
            exit()
if ac:
    print('Yes')
else:
    print('No)

Fixed code:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
if ac:
    print('Yes')
else:
    print('No')
Buggy code:
n = int(input())

f = False

for i in range(26):
    for j in range(15):
        if 4 * i + 7 * j == n:
            f = True
            break
        else:
            pass

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

Fixed code:
n = int(input())

f = False

for i in range(26):
    for j in range(15):
        if 4 * i + 7 * j == n:
            f = True
            break
        else:
            pass

if f:
    print("Yes")
else:
    print("No")
Buggy code:
N = int(input())

flag = 0

for i in range(26):
    for j in range(16):
      if j*4+j*7 == N:
        flag = 1

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


Fixed code:
N = int(input())

flag = 0

for i in range(26):
    for j in range(16):
      if i*4+j*7 == N:
        flag = 1

if flag == 1:
    print("Yes")
else:
    print("No")
Buggy code:
n=int(input())
ans="No"
while n>=0
  if n%4==0:
    ans="Yes"
    break
  else:
    n-=7
print(ans)

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

Fixed code:
N = int(input())
ans = "No"
for i in range(N):
    for j in range(N):
        if(4*i + 7*j == N):
            ans = "Yes"
print(ans)
Buggy code:
N=int(input())
res=False
for i in range(N//7):
    if (N-7*i)%4==0:
        res=True
        break

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


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

if res:
    print("Yes")
else:
    print("No")
Buggy code:
N = int(input())
for x in range(N // 4 + 1):
  if (N - 4 * x) % 7 == 0:
    print('Yes')
    break
print('No')

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

Fixed code:
n = int(input())
dmax = n // 7
ans = "No"
for i in range(dmax+1):
	if (n - i*7) % 4 == 0:
		ans = "Yes"
		break
print(ans)
Buggy code:
def det(n):
    seven = range((n // 7) + 1)
    four = range((n // 4) + 1)
    for i in seven:
        for p in four:
            if (i*7 + p*4) == n:
                return 'Yes'
    return 'No'
x = int(input)
print(det(x))

Fixed code:
def det(n):
    seven = range((n // 7) + 1)
    four = range((n // 4) + 1)
    for i in seven:
        for p in four:
            if (i*7 + p*4) == n:
                return 'Yes'
    return 'No'
x = int(input())
print(det(x))
Buggy code:
#2019/10/25
N = int(open(0).read())
maxCake = N//4+1
maxDon = N//7+1
flg =False
for i in range(maxCake):
    for j in range(maxDon):
        if i*4+j*7==N:
            print('Yes')
            flg = True
            break;
    if flg == True:
        break
if flg == False:
    print('NO')
        

Fixed code:
#2019/10/25
# N = int(open(0).read())
N = int(input())
maxCake = N//4+1
maxDon = N//7+1
flg =False
for i in range(maxCake):
    for j in range(maxDon):
        if i*4+j*7==N:
            print('Yes')
            flg = True
            break;
    if flg == True:
        break
if flg == False:
    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:
def canbuy(n):
    for i in range(int(100/7)):
        if (n-7*i)>3 and (n-7*i)%4==0:
            return 'Yes'
    return 'No'

n=input()
print(canbuy(n))


Fixed code:
def canbuy(n):
    for i in range(int(100/7)):
        tmp = n-7*i
        if tmp==0 or (tmp>3 and tmp%4==0):
            return 'Yes'
    return 'No'

n=int(input())
print(canbuy(n))
Buggy code:
import math
N = int(input())

flag = False

for i in range(ceil(N/7)+1):
    for j in range(ceil(N/4)+1):
        if flag == True:
            continue
        #print(N - i * 7 - j * 4 )
        if N - i * 7 - j * 4 == 0:
            flag = True

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


Fixed code:
import math
N = int(input())

flag = False

for i in range(math.ceil(N/7)+1):
    for j in range(math.ceil(N/4)+1):
        if flag == True:
            continue
        #print(N - i * 7 - j * 4 )
        if N - i * 7 - j * 4 == 0:
            flag = True

if flag == True:
    print('Yes')
else:
    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())
a = N//7
AA = [(N-7*i)%4 for i in range(a)]
if 0 in AA:
    print("Yes")
else:
    print("No")


Fixed code:
N = int(input())
a = N//7
AA = [(N-7*i)%4 for i in range(a+1)]
if 0 in AA:
    print("Yes")
else:
    print("No")
Buggy code:
n = int(input())

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

Fixed code:
n = int(input())

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

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

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

Fixed code:
N=int(input())
flag=False

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


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