qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import math
N, A, B = map(int, input().split())
H = [int(input()) for i in range(N)]
    
def f(x):
    s = sum([math.ceil(max(0, h - x * B) / (A - B)) for h in H])
    if s <= x:
        return True
    else:
        return False
    
l = 0
r = 10 ** 9 + 7
while l < r:
    m = (l + r) // 2
    if f(m):
        r = m
    else:
        l = m + 1
    print(r, l, m)
        
print(m)

Fixed code:
import math
N, A, B = map(int, input().split())
H = [int(input()) for i in range(N)]
    
def f(x):
    s = sum([math.ceil(max(0, h - x * B) / (A - B)) for h in H])
    if s <= x:
        return True
    else:
        return False
    
l = 0
r = 10 ** 9 + 7
while r - l > 1:
    m = (l + r) // 2
    if f(m):
        r = m
    else:
        l = m
    # print(r, l, m)
        
print(r)
Buggy code:
import sys

def is_enough(H, A, B, T):
    cnt = 0
    diff = A - B
    base = B * T
    for h in H:
        if h <= base:
            continue

        cnt += (h + diff - 1) // diff
        if cnt > T:
            return False

    return True


def main():
    input = sys.stdin.readline
    N, A, B = map(int, input().split())
    H = [int(input()) for _ in range(N)]

    R = (max(H) + B - 1) // B
    L = (min(H) + A - 1) // A
    while R != L:
        c = (R + L) // 2
        if is_enough(H,  A, B, c):
            R = c
        else:
            L = c + 1

    return L


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


Fixed code:
import sys

def is_enough(H, A, B, T):
    cnt = 0
    diff = A - B
    base = B * T
    for h in H:
        if h <= base:
            continue

        cnt += (h - base + diff - 1) // diff
        if cnt > T:
            return False

    return True


def main():
    input = sys.stdin.readline
    N, A, B = map(int, input().split())
    H = [int(input()) for _ in range(N)]

    R = (max(H) + B - 1) // B
    L = (min(H) + A - 1) // A
    while R != L:
        c = (R + L) // 2
        if is_enough(H,  A, B, c):
            R = c
        else:
            L = c + 1

    return L


if __name__ == '__main__':
    print(main())
Buggy code:
import sys
def p(*a):
  s=" ".join(map(str,a))
  #print(s)
  sys.stderr.write(s+"\n")

N,A,B=map(int, input().split())
H=[int(input()) for i in range(N)]
p(N,A,B,H)

import math
C=A-B
TMax=math.ceil(max(H)/B)
TMin=1
p(A,B,C,TMax,TMin)

def isDel(t):
  x=0
  for h in H:
    x+=math.ceil((h-B*t)/C)
    if x>t: break
  return (t>=x)

t=TMax
while TMax>TMin:
  t=math.ceil((TMax+TMin)/2)
  if isDel(t):
    TMax=t
  else:
    TMin=t+1
print(TMax)


Fixed code:
import sys
def p(*a):
  s=" ".join(map(str,a))
  #print(s)
  sys.stderr.write(s+"\n")

N,A,B=map(int, input().split())
H=[int(input()) for i in range(N)]
p(N,A,B,H)

import math
C=A-B
TMax=math.ceil(max(H)/B)
TMin=1
p(A,B,C,TMax,TMin)

def canWipe(t):
  x=0
  for h in H:
    x+=max(0,math.ceil((h-B*t)/C))
    if x>t: break
  return (t>=x)

t=TMax
ans=t
while TMax!=TMin:
  t=(TMax+TMin)//2
  if canWipe(t):
    ans=t
    TMax=t
  else:
    TMin=t+1
print(ans)
Buggy code:
N,A,B = map(int,input().split())
H = [int(input()) for _ in range(N)]

from math import ceil

ng,ok = 0,10**9+1
while abs(ok-ng)>1:
    mid = (ng+ok)//2
    cnt = 0
    for i in range(N):
        cnt += max(ceil((H[i] - B*mid)/(A-B)) ,0)
    if cnt == mid:
        break
    if cnt <= mid:
        ok = mid
    else:
        ng = mid

print(ok)



Fixed code:
N,A,B = map(int,input().split())
H = [int(input()) for _ in range(N)]

from math import ceil

ng,ok = 0,10**9+1
while abs(ok-ng)>1:
    mid = (ng+ok)//2
    cnt = 0
    for i in range(N):
        cnt += max(ceil((H[i] - B*mid)/(A-B)) ,0)
    if cnt <= mid:
        ok = mid
    else:
        ng = mid

print(ok)
Buggy code:
import sys
sys.setrecursionlimit(10**6)
N, A, B = map(int, input().split())
h = []
for _ in range(N):
    h.append(int(input()))


def check(m):
    cnt = 0
    for i in range(N):
        cnt += -(-(h[i]-m*B)//(A-B))
    print(m, cnt)
    return cnt <= m


def binary_search(l, r):
    c = (l+r)//2
    if r-l == 1:
        return l if check(c) else r

    if check(c):
        return binary_search(l, c)
    else:
        return binary_search(c, r)

print(binary_search(0, 10**11))


Fixed code:
import sys
sys.setrecursionlimit(10**6)
N, A, B = map(int, input().split())
h = []
for _ in range(N):
    h.append(int(input()))


def check(m):
    cnt = 0
    for i in range(N):
        cnt += max(-(-(h[i]-m*B)//(A-B)), 0)
    return cnt <= m


def binary_search(l, r):
    c = (l+r)//2
    if r-l == 1:
        return l if check(c) else r

    if check(c):
        return binary_search(l, c)
    else:
        return binary_search(c, r)

print(binary_search(0, 10**9+1))
Buggy code:
import math
"""
def search(min_,max_,A,B,arr):
#    print(min_,max_)
    if min_==max_:
        return min_
    mid=(max_+min_)//2
    
    tmp=arr-mid*B
    
    if len(tmp)==0:
        return search(min_,mid,A,B,arr)
    
    tmp=map(lambda x:math.ceil(x/(A-B)),tmp)
    sum_=sum(list(tmp))
    if sum_<=mid:
        return search(min_,mid,A,B,arr)
    else:
        return search(mid+1,max_,A,B,arr)

    while True:
        if k<0:
            if mid==min_:
                return max_
            else:
                #failure
                return search(mid,max_,A,B,arr[:L])
        elif len(tmp)==0:
            #success
            return search(min_,mid,A,B,arr)
        x=-tmp[0]
        tmp=np.delete(tmp,0)
        k-=x//(A-B)+(x%(A-B)>0)
"""
        
    
N,A,B=list(map(int,input().split()))
arr=[]

for i in range(N):
    h=int(input())
    arr.append(h)

max_=max(arr)//B+1
min_=min(arr)//A

d=A-B

while min_!=max_:
    mid=(max_+min_)//2
    
    tmp=arr-mid*B
    
    sum_=0
    for x in tmp:
        sum_+=math.ceil(x/d)
    
    if sum_<=mid:
        max_=mid
    else:
        min_=mid+1

print(min_)

Fixed code:
import math
"""
def search(min_,max_,A,B,arr):
#    print(min_,max_)
    if min_==max_:
        return min_
    mid=(max_+min_)//2
    
    tmp=arr-mid*B
    
    if len(tmp)==0:
        return search(min_,mid,A,B,arr)
    
    tmp=map(lambda x:math.ceil(x/(A-B)),tmp)
    sum_=sum(list(tmp))
    if sum_<=mid:
        return search(min_,mid,A,B,arr)
    else:
        return search(mid+1,max_,A,B,arr)

    while True:
        if k<0:
            if mid==min_:
                return max_
            else:
                #failure
                return search(mid,max_,A,B,arr[:L])
        elif len(tmp)==0:
            #success
            return search(min_,mid,A,B,arr)
        x=-tmp[0]
        tmp=np.delete(tmp,0)
        k-=x//(A-B)+(x%(A-B)>0)
"""
        
    
N,A,B=list(map(int,input().split()))
arr=[]

for i in range(N):
    arr.append(int(input()))

max_=max(arr)//B+1
min_=min(arr)//A

d=A-B

while min_!=max_:
    mid=(max_+min_)//2
    
    sum_=0
    for x in arr:
        sum_+=max(0,math.ceil((x-mid*B)/d))
        
    if sum_<=mid:
        max_=mid
    else:
        min_=mid+1

print(min_)
Buggy code:
n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

left = 0
right = 10**9
mid = (left + right) // 2
while right - left > 1:
    mid = (left + right) // 2
    count = 0
    for i in range(n):
        if h[i] - mid * b > 0:
            count += (h[i] - mid * b) // (a - b) + 1
    if mid - count >= 0:
        right = mid
    else:
        left = mid
print(mid)

Fixed code:
n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

left = 0
right = 10**10
mid = (left + right) // 2
while right - left > 1:
    mid = (left + right) // 2
    count = 0
    for i in range(n):
        if h[i] - mid * b > 0:
            if (h[i] - mid * b) % (a - b) == 0:
                count += (h[i] - mid * b) // (a - b)
            else:
                count += (h[i] - mid * b) // (a - b) + 1
    if mid - count >= 0:
        right = mid
    else:
        left = mid
print(right)
Buggy code:
import math

N, A, B = map(int, input().split())
H = [int(input()) for i in range(N)]

add_damage = A-B
left = 1
right = 10**9
ans = float('inf')

for i in range(int(math.log(10**9, 2)+1)):
    T = (left+right) // 2
    h = H.copy()
    h = list(map(lambda x: max(0, x-T*B), h))
    h = list(map(lambda x: math.ceil(x / add_damage), h))
    need = sum(h)
    print(h, T)
    if need <= T:
        right = T
        ans = min(ans, T)
    else:
        left = T

print(int(ans))

Fixed code:
import math

N, A, B = map(int, input().split())
H = [int(input()) for i in range(N)]

add_damage = A-B
left = 1
right = 10**9
ans = float('inf')

for i in range(int(math.log(10**9, 2)+1)):
    T = (left+right) // 2
    h = H.copy()
    h = list(map(lambda x: max(0, x-T*B), h))
    h = list(map(lambda x: math.ceil(x / add_damage), h))
    need = sum(h)
    
    if need <= T:
        right = T
        ans = min(ans, T)
    else:
        left = T

print(int(ans))
Buggy code:
from math import ceil
n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

def enough(t):
    count = 0
    for hp in h:
        count += ceil(max(0, hp - b*t) / (a-b))
    if(count <= t):
        return True
    else:
        return False


high = ceil(max(h)/b)
low = 0
while(high - low > 1):
    mid = (high + low) // 2
    if(enough(mid)):
        high = mid
    else:
        low = mid
print(mid)


Fixed code:
from math import ceil
n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

def enough(t):
    count = 0
    for hp in h:
        count += ceil(max(0, hp - b*t) / (a-b))
    if(count <= t):
        return True
    else:
        return False


high = ceil(max(h)/b)
low = 0
while(high - low > 0):
    mid = (high + low) // 2
    if(enough(mid)):
        high = mid
    else:
        low = mid + 1
print(low)
Buggy code:
from math import ceil

N, A, B = map(int, input().split())
H = []
for _ in range(N):
    H.append(int(input()))
    
left = 0
right = max(H)//B + 1

while right - left > 2:
    mid = (right + left) // 2
    c = sum([ceil((h-B*mid)/(A-B)) for h in H if h > B*mid])
    
    if c > mid:
        left = mid
    else:
        right = mid
print(left+1)

Fixed code:
from math import ceil

N, A, B = map(int, input().split())
H = []
for _ in range(N):
    H.append(int(input()))
    
left = 0
right = max(H)//B + 1

while right - left > 1:
    mid = (right + left) // 2
    c = sum([ceil((h-B*mid)/(A-B)) for h in H if h > B*mid])
    
    if c > mid:
        left = mid
    else:
        right = mid
print(right)
Buggy code:
import numpy as np
import math

N,A,B = map(int, input().split())
h = np.zeros(N)

for i in range(N) :
    h[i] = int(input())

ans = 0
mn = 0
mx = np.ceil(h.max()/B)
now = mx//2
while (mx-mn) <= 1 :
    if now >= sum(np.ceil(tmp[tmp>0]/(A-B))) :
        mx = now
    else :
        mn = now

    now = (mx+mn)//2

print(int(mx))

Fixed code:
import numpy as np
import math

N,A,B = map(int, input().split())
h = np.zeros(N)

for i in range(N) :
    h[i] = int(input())

ans = 0
mn = 0
mx = np.ceil(h.max()/B)
now = mx//2
while (mx-mn) > 1 :
    tmp = h-B*now
    if now >= sum(np.ceil(tmp[tmp>0]/(A-B))) :
        mx = now
    else :
        mn = now

    now = (mx+mn)//2

print(int(mx))
Buggy code:
import math

def calc(H, T, a, b):
    cnt = 0
    for h in H:
        cnt += math.ceil((h - b * T) / (a - b))
    if cnt <= T:
        return True
    else:
        return False

tmp = [int(n) for n in input().split()]
a = tmp[1]
b = tmp[2]
H = []

for i in range(tmp[0]):
    H.append(int(input()))
H = list(sorted(H))[::-1]
minT = 0
maxT = math.ceil(H[0] / b)
T = int((maxT + minT) / 2)

while True:
    T = int((maxT + minT) / 2)
    if calc(H, T, a, b):
        maxT = T
        if maxT - minT <= 1:
            break
    else:
        minT = T
print(T)


Fixed code:
import math

def calc(H, T, a, b):
    cnt = 0
    for h in H:
        if (h -b*T) >= 0:
            cnt += math.ceil((h - b * T) / (a - b))
    if cnt <= T:
        return True
    else:
        return False

tmp = [int(n) for n in input().split()]
a = tmp[1]
b = tmp[2]
H = []

H = sorted([int(input()) for i in range(tmp[0])])[::-1]
minT = 0
maxT = math.ceil(H[0] / b)
T = int((maxT + minT) / 2)

while True:
    T = math.ceil((maxT + minT) / 2)
    if calc(H, T, a, b):
        maxT = T
    else:
        minT = T
    if maxT - minT <= 1:
        break
print(maxT)
Buggy code:
    import math
     
    n, a, b = map(int, input().split(" "))
     
    h = []
    for i in range(n):
        h.append(int(input()))
     
    h.sort(reverse=True)
     
     
    def check(count_target, h, a, b):
        count = 0
     
        for i in h:
            if i >= count_target * b:
                count += math.ceil((i - count_target * b) / (a - b))
        return count_target - count
     
     
    l = 1
    r = math.ceil(h[0] / b)
     
     
    while r - l > 1:
        mid = math.floor(l + (r - l) / 2)
     
        if check(mid, h, a, b) < 0:
            l = mid
        else:
            r = mid
     
     
    if check(l, h, a, b) < 0:
        print(int(r))
    else:
        print(int(l))

Fixed code:
import math

n, a, b = map(int, input().split(" "))

h = []
for i in range(n):
    h.append(int(input()))

h.sort(reverse=True)


def check(count_target, h, a, b):
    count = 0

    for i in h:
        if i >= count_target * b:
            count += math.ceil((i - count_target * b) / (a - b))
    return count_target - count


l = 1
r = math.ceil(h[0] / b)


while r - l > 1:
    mid = math.floor(l + (r - l) / 2)

    if check(mid, h, a, b) < 0:
        l = mid
    else:
        r = mid


if check(l, h, a, b) < 0:
    print(int(r))
else:
    print(int(l))
Buggy code:
def check(N,A,B,h,K):
    sum = 0
    for i in range(N):
        x = -((-h[i]+B*K)/(A-B))
        sum += x if x>0 else 0
    return sum<K

N, A, B = list(map(int,input().split()))
h=[0]*N
for i in range(N):
    h[i] = int(input())

ok = 1000000000
ng = 0
while abs(ok -ng)>1:
    mid = (ok+ng)//2
    if check(N,A,B,h,mid):
        ok = mid
    else:
        ng = mid
print(ok)


Fixed code:
def check(N,A,B,h,K):
    sum = 0
    for i in range(N):
        x = -((-h[i]+B*K)//(A-B))
        sum += x if x>0 else 0
    return sum<=K

N, A, B = list(map(int,input().split()))
h=[0]*N
for i in range(N):
    h[i] = int(input())

ok = 1000000000
ng = 0
while abs(ok -ng)>1:
    mid = (ok+ng)//2
    if check(N,A,B,h,mid):
        ok = mid
    else:
        ng = mid
print(ok)
Buggy code:
# -*- coding: utf-8 -*-
import math

def bs(n, a, b, hp, min=0, max=10**5):
    left = min
    right = max
    def count(num):
        base = b * num
        attackcount = 0
        diff = a-b
        for i in range(n):
            tmp = math.ceil((hp[i] - base) / diff)
            if tmp <= 0:
                pass
            else:
                attackcount += tmp
        if attackcount <= num:
            return True
        else:
            return False
    while left != right:
        mid = (left + right) // 2
        if count(mid):
            right = mid
        else:
            left = mid + 1
    return left

if __name__ == '__main__':
    n, a, b = map(int, input().split())
    hp = [int(input()) for i in range(n)]
    print(bs(n, a, b, hp))

Fixed code:
import math

def bs(n, a, b, hp, min=0, max=10**9):
    left = min
    right = max
    def count(num):
        base = b * num
        attackcount = 0
        diff = a-b
        for i in range(n):
            tmp = math.ceil((hp[i] - base) / diff)
            if tmp <= 0:
                pass
            else:
                attackcount += tmp
        if attackcount <= num:
            return True
        else:
            return False
    while left != right:
        mid = (left + right) // 2
        if count(mid):
            right = mid
        else:
            left = mid + 1
    return left

if __name__ == '__main__':
    n, a, b = map(int, input().split())
    hp = [int(input()) for i in range(n)]
    print(bs(n, a, b, hp))
Buggy code:
n, A, B = map(int, input().split())
l = [int(input()) for x in range(n)]

left = 0
right = 10**9


def is_ok(t):
    return all(map(lambda x: max(0, x - B*t) <= t, l))


while abs(left - right) > 1:
    now = (left + right) // 2
    if is_ok(now):
        right = now
    else:
        left = now

print([right, left][is_ok(left)])


Fixed code:
n, A, B = map(int, input().split())
l = [int(input()) for x in range(n)]

left = 0
right = 10**9


def is_ok(t):
    AB = A - B
    return sum(map(lambda x: max(0, x - B*t + (AB - 1)) // (AB), l)) <= t


while abs(left - right) > 1:
    now = (left + right) // 2
    if is_ok(now):
        right = now
    else:
        left = now

print([right, left][is_ok(left)])
Buggy code:
# coding: utf-8
import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time

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


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def read():
    N, A, B = ILI()
    h = [II() for __ in range(N)]
    return (N, A, B, h)


def bool_exc(h, dif_ab, B, count):
    dif_count = 0
    for mon in h:
        dif_mon = mon - B * count
        if dif_mon <= 0:
            continue
        else:
            dif_count += math.ceil(dif_mon / dif_ab)
            if dif_count > count:
                break

    dif = count - dif_count
    return dif


def solve(N, A, B, h):
    right = max(h) // B + 1
    left = min(h) // A + 1
    dif_ab = A - B
    while left != right:
        mid = (left + right) // 2
        dif = bool_exc(h, dif_ab, B, mid)
        if dif > 0:
            right = mid - 1
        elif dif == 0:
            right = mid
        elif dif < 0:
            left = mid + 1

    ans = left
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()


Fixed code:
# coding: utf-8
import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time

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


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def read():
    N, A, B = ILI()
    h = [II() for __ in range(N)]
    return (N, A, B, h)


def bool_exc(h, dif_ab, B, count):
    dif_count = 0
    for mon in h:
        dif_mon = mon - B * count
        if dif_mon <= 0:
            continue
        else:
            dif_count += math.ceil(dif_mon / dif_ab)
            if dif_count > count:
                break

    dif = count - dif_count
    return dif


def solve(N, A, B, h):
    right = max(h) // B + 1
    left = min(h) // A + 1
    dif_ab = A - B
    while left != right:
        mid = (left + right) // 2
        dif = bool_exc(h, dif_ab, B, mid)
        if dif >= 0:
            right = mid
        else:
            left = mid + 1

    ans = left
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()
Buggy code:
a, b = map(int, input().split())
if a==b==2:
  print('Yes')
elif a and b in [4, 6, 9, 11]:
  print('Yes')
elif a and b in [1, 3, 5, 7, 8, 10, 12]:
  print('Yes')
else:
  print('No')

Fixed code:
a, b = map(int, input().split())
lst = [4, 6, 9, 11]
lst2 = [1, 3, 5, 7, 8, 10, 12]
if a==b==2:
  print('Yes')
elif a in lst and b in lst:
  print('Yes')
elif a in lst2 and b in lst2:
  print('Yes')
else:
  print('No')
Buggy code:
x, y = map(int, input().split())
if x==y or (x and y in [4, 6, 9, 11]) or (x and y in [1, 3, 4, 7, 8, 10, 12]):
  print('Yes')
else:
  print('No')

Fixed code:
x, y = map(int, input().split())
g1 = [1,3,5,7,8,10,12]
g2 = [4,6,9,11]
if (x in g1 and y in g1) or (x in g2 and y in g2):
    print('Yes')
else:
    print('No')
Buggy code:
#!/bin/usr/python

A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]

x,y = [int(i) for i in input().split()]

if x in A and y in A or x in B and y in B or x in C and y in C:
  print("yes")
else:
  print("no")

Fixed code:
#!/bin/usr/python

A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]

x,y = [int(i) for i in input().split()]

if x in A and y in A or x in B and y in B or x in C and y in C:
  print("Yes")
else:
  print("No")
Buggy code:
def flg_fun(a):
    if a in [1,3,5,7,8,10,12]:
        b=1
    else:
        if a==2:
            b=2
        else:
            b=3
    return b


def assign_fun(x, y):
    if x==y:
        print("Yes")
    else:
        if flg_fun(x)==flg_fun(y):
            print("Yes")
        else:
            print("No")

a = input().split(" ")
assign_fun(a[0], a[1])

Fixed code:
def flg_fun(a):
    if a in [1,3,5,7,8,10,12]:
        b=1
    else:
        if a==2:
            b=2
        else:
            b=3
    return b


def assign_fun(x, y):
    if x==y:
        print("Yes")
    else:
        if flg_fun(x)==flg_fun(y):
            print("Yes")
        else:
            print("No")

a = input().split(" ")
assign_fun(int(a[0]), int(a[1]))
Buggy code:
x,y = map(int,input().split())
a = {1,3,5,7,8,10,12}
b = {4,6,9,11}
if x in a and y in a:
    print('Yes')
elif x in b and y in b:
    print('Yes')
else:
    print('NO')

Fixed code:
x,y = map(int,input().split())
a = {1,3,5,7,8,10,12}
b = {4,6,9,11}
if x in a and y in a:
    print('Yes')
elif x in b and y in b:
    print('Yes')
else:
    print('No')
Buggy code:
x, y = map(int, input().split())
if x == 2 or y == 2:
    print('No')
else:
    m1 = set(1, 3, 5, 7, 8, 10, 12)
    m2 = set(4, 6, 9, 11)
    if (x in m1 and y in m1) or (x in m2 and y in m2):
        print('Yes')
    else:
        print('No')

Fixed code:
x, y = map(int, input().split())
if x == 2 or y == 2:
    print('No')
else:
    m1 = set([1, 3, 5, 7, 8, 10, 12])
    m2 = set([4, 6, 9, 11])
    if (x in m1 and y in m1) or (x in m2 and y in m2):
        print('Yes')
    else:
        print('No')
Buggy code:
x,y=map(int, input().split())
a = {1,3,5,7,8,10,12}
b = {4,6,9,11}
print('Yes' if x,y<=a or x,y<=b else 'No')

Fixed code:
x,y=map(int, input().split())
a = {1,3,5,7,8,10,12}
b = {4,6,9,11}
print('Yes' if {x,y}<=a or {x,y}<=b else 'No')
Buggy code:
S = 'ACABABAABABA'
x,y = map(int, input().split())
print('Yes' if S[x]==S[y] else 'No')

Fixed code:
S = 'ACABABAABABA'
x,y = map(int, input().split())
print('Yes' if S[x-1]==S[y-1] else 'No')
Buggy code:
x, y = map(int, input().split())
list1 = [1, 3, 5, 7, 8, 10, 12]
list2 = [4, 6, 9, 11]
list3 = [2]
if (x in list1 and y in list1)　or (x in list2 and y in list2) or (x in list3 and y in list3):
  print('Yes')
else:
  print('No')
  

Fixed code:
x, y = map(int, input().split())
list1 = [1, 3, 5, 7, 8, 10, 12]
list2 = [4, 6, 9, 11]
list3 = [2]
A = x in list1 and y in list1
B = x in list2 and y in list2
C = x in list3 and y in list3
if A == True or B == True or C == True:
  print('Yes')
else:
  print('No')
Buggy code:
x,y=map(int,input().split())
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]
print('Yes' if (x in A and y in A) or (x in B and y in B) or (x in C or y in C) else "No")

Fixed code:
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]

x,y=map(int,input().split())
if x in A and y in A:
    print('Yes')
elif x in B and y in B:
    print('Yes')
else:
    print('No')
Buggy code:
x,y = input().split()
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]
if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
    print("Yes")
else:
    print("No")
    

Fixed code:
x,y = map(int, input().split())
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]
if (x in a and y in a) or (x in b and y in b) or (x in c and y in c):
    print("Yes")
else:
    print("No")
Buggy code:
x, y = map(int, input().split())
A = ['1', '3', '5', '7', '8', '10', '12']
B = ['4', '6', '9', '11']
if x == y == 2:
    print('Yes')
elif (x in A) and (y in A):
    print('Yes')
elif (x in B) and (y in B):
    print('Yes')
else:
    print('No')

Fixed code:
x, y = input().split()
A = ['1', '3', '5', '7', '8', '10', '12']
B = ['4', '6', '9', '11']
if x == y == '2':
    print('Yes')
elif (x in A) and (y in A):
    print('Yes')
elif (x in B) and (y in B):
    print('Yes')
else:
    print('No')
Buggy code:
d=[0,1,2,1,0,1,0,1,1,0,1,0,1]
a,b=map(int,input.split())
print('Yes' if d[a]==d[b] else 'No')

Fixed code:
d=[0,1,2,1,0,1,0,1,1,0,1,0,1]
a,b=map(int,input().split())
print('Yes' if d[a]==d[b] else 'No')