Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s = input()

n1 = s[0:2]
n2 = s[2:4]

if int(n1) > 12 and int(n2) > 12:
  out_print = 'NA'

  elif int(n1) <= 12 and int(n2) <= 12:
    out_print = 'AMBIGUOUS'
    if int(n1) == 0:
      out_print = 'YYMM'
      elif int(n2) == 0:
        out_print = 'MMYY'
        elif int(n1)==0 and int(n2)==0:
          out_print = 'NA'
          elif int(n1) <= 12 and int(n2) >12:
            out_print = 'MMYY'
            if int(n1) == 0:
              out_print = 'NA'

              elif int(n1) > 12 and int(n2) <= 12:
                out_print = 'YYMM'
                if int(n2) == 0:
                  out_print = 'NA'
                  print(out_print)

Fixed submission:
s = input()

n1 = s[0:2]
n2 = s[2:4]

if int(n1) > 12 and int(n2) > 12:
    out_print = 'NA'

elif int(n1) <= 12 and int(n2) <= 12:
    out_print = 'AMBIGUOUS'
    if int(n1) == 0 and int(n2)!=0:
        out_print = 'YYMM'
    elif int(n1) != 0 and int(n2) == 0:
        out_print = 'MMYY'
    elif int(n1)==0 and int(n2)==0:
        out_print = 'NA'

elif int(n1) <= 12 and int(n2) >12:
    out_print = 'MMYY'
    if int(n1) == 0:
        out_print = 'NA'

elif int(n1) > 12 and int(n2) <= 12:
    out_print = 'YYMM'
    if int(n2) == 0:
        out_print = 'NA'
print(out_print)

Buggy python submission (verdict: Runtime Error):

s = input()

n1 = s[0:2]
n2 = s[2:4]

if int(n1) > 12 and int(n2) > 12:
    out_print = 'NA'

elif int(n1) <= 12 and int(n2) <= 12:
    out_print = 'AMBIGUOUS'
    if int(n1) == 0:
        out_print = 'YYMM'
    elif int(n2) == 0:
        out_print = 'MMYY'
    elif int(n1)==0 and int(n2)==0
        out_print = 'NA'
elif int(n1) <= 12 and int(n2) >12:
    out_print = 'MMYY'
    if int(n1) == 0:
        out_print = 'NA'

elif int(n1) > 12 and int(n2) <= 12:
    out_print = 'YYMM'
    if int(n2) == 0:
        out_print = 'NA'

print(out_print)

Fixed submission:
s = input()

n1 = s[0:2]
n2 = s[2:4]

if int(n1) > 12 and int(n2) > 12:
    out_print = 'NA'

elif int(n1) <= 12 and int(n2) <= 12:
    out_print = 'AMBIGUOUS'
    if int(n1) == 0 and int(n2)!=0:
        out_print = 'YYMM'
    elif int(n1) != 0 and int(n2) == 0:
        out_print = 'MMYY'
    elif int(n1)==0 and int(n2)==0:
        out_print = 'NA'

elif int(n1) <= 12 and int(n2) >12:
    out_print = 'MMYY'
    if int(n1) == 0:
        out_print = 'NA'

elif int(n1) > 12 and int(n2) <= 12:
    out_print = 'YYMM'
    if int(n2) == 0:
        out_print = 'NA'
print(out_print)
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = tuple(input().split())
judge = 0
for i in range(n):
  for j in range(i+1,n):
    if nums[i] == nums[j]:
      judge = 1
if judge == 0:
  print("YES")
else:
  print("NO")

Fixed submission:
input1 = input()
s = str(input1).split(' ')[0]
t = str(input1).split(' ')[1]
input2 = input()
a = int(str(input2).split(' ')[0])
b = int(str(input2).split(' ')[1])
u = str(input())
if s == u:
  a = a - 1
else:
  b = b - 1
print(a, ' ', b)

Buggy python submission (verdict: Runtime Error):
word = str(input())
for i in range(len(word)):
  word[i] = 'x'
print(word)

Fixed submission:
input1 = input()
s = str(input1).split(' ')[0]
t = str(input1).split(' ')[1]
input2 = input()
a = int(str(input2).split(' ')[0])
b = int(str(input2).split(' ')[1])
u = str(input())
if s == u:
  a = a - 1
else:
  b = b - 1
print(a, ' ', b)

Buggy python submission (verdict: Runtime Error):
s, t = input(), input()
a, b = input(), input()
u = input()
if s == t:
  a = a - 1
else:
  b = b - 1
print(a, b)

Fixed submission:
input1 = input()
s = str(input1).split(' ')[0]
t = str(input1).split(' ')[1]
input2 = input()
a = int(str(input2).split(' ')[0])
b = int(str(input2).split(' ')[1])
u = str(input())
if s == u:
  a = a - 1
else:
  b = b - 1
print(a, ' ', b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
nums = tuple(input().split())
judge = 0
for i in range(n):
  for j in range(i+1,n):
    if nums[i] == nums[j]:
      judge = 1
if judge == 0:
  print("YES")
else:
  print("NO")

Fixed submission:
n = int(input())
a = input().split()
a = sorted(list(map(int, a)))
def check(a):
    for i in range(n-1):
        if a[i] == a[i+1]:
            return 0
    return 1
if check(a) == 0:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
nums = str(input())
nums = nums.split()
judge = 0
for i in range(n):
  for j in range(i+1,n):
    if nums[i] == nums[j]:
      judge = 1
if judge == 0:
  print("YES")
else:
  print("NO")

Fixed submission:
n = int(input())
a = input().split()
a = sorted(list(map(int, a)))
def check(a):
    for i in range(n-1):
        if a[i] == a[i+1]:
            return 0
    return 1
if check(a) == 0:
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
inp = input().split()
n, k = int(inp[0]), int(inp[1])
p = input().split()
p = list(map(int, p))
max_ = 0
for i in range(n-k+1):
  sum_ = 0
  for j in range(k):
    sum_ = sum_ + (p[i+j]+1)/2
  if sum_ > max_:
    max_ = sum_
print(max_)

Fixed submission:
inp = input().split()
n, k = int(inp[0]), int(inp[1])
p = input().split()
p = list(map(int, p))
sum_ = 0
max_ = 0
for i in range(n):
    sum_ += p[i]
    if i >= k:
        sum_ -= p[i-k]
    if sum_ > max_:
        max_ = sum_
print((max_+k)/2)

Buggy python submission (verdict: Time Limit Exceeded):
inp = input().split()
n, k = int(inp[0]), int(inp[1])
p = input().split()
p = list(map(int, p))
max_ = 0
for i in range(n-k+1):
  sum_ = 0
  for j in range(k):
    temp = p[i+j]
    sum_ = sum_ + (temp+1)/2
  if sum_ > max_:
    max_ = sum_
print(max_)

Fixed submission:
inp = input().split()
n, k = int(inp[0]), int(inp[1])
p = input().split()
p = list(map(int, p))
sum_ = 0
max_ = 0
for i in range(n):
    sum_ += p[i]
    if i >= k:
        sum_ -= p[i-k]
    if sum_ > max_:
        max_ = sum_
print((max_+k)/2)
Buggy python submission (verdict: Time Limit Exceeded):
Q = int(input())
l = [0 for q in range(Q)]
r = [0 for q in range(Q)]
for q in range(Q):
  l[q], r[q] = map(int, input().split(' '))
max_r = max(r)
prime_numbers = [True for n in range(max_r+1)]
similar_numbers = [False for n in range(max_r+1)]

prime_numbers[0], prime_numbers[1] = False, False    # 1 is not a prime number
for divisor in range(2, max_r//2 + 1):
  if prime_numbers[divisor]:
    for multipler in range(2, max_r//divisor + 1):
      prime_numbers[divisor * multipler] = False
      
for N in range(1, max_r + 1, 2):
  if prime_numbers[N] and prime_numbers[(N+1)//2]:
    similar_numbers[N] = True
    
for q in range(Q):
  print(sum(similar_numbers[l[q]:r[q]+1]))

Fixed submission:
import itertools

Q = int(input())
l = [0 for q in range(Q)]
r = [0 for q in range(Q)]
for q in range(Q):
  l[q], r[q] = map(int, input().split(' '))
max_r = max(r)
prime_numbers = [True for n in range(max_r+1)]
similar_numbers = [False for n in range(max_r+1)]
 
prime_numbers[0], prime_numbers[1] = False, False    # 1 is not a prime number
for divisor in range(2, max_r//2 + 1):
  if prime_numbers[divisor]:
    for multipler in range(2, max_r//divisor + 1):
      prime_numbers[divisor * multipler] = False
      
for N in range(1, max_r + 1, 2):
  if prime_numbers[N] and prime_numbers[(N+1)//2]:
    similar_numbers[N] = True
accumulate_sim_nums = list(itertools.accumulate(map(int, similar_numbers)))
    
for q in range(Q):
  print(accumulate_sim_nums[r[q]]-accumulate_sim_nums[l[q]-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = N % 1000
b = a!= 0 ? 1000 - a : 0
print(b)

Fixed submission:
N = int(input())
a = N % 1000
b = 1000 - a if a!=0 else 0
print(b)
Buggy python submission (verdict: Runtime Error):
N = int(input())
Ss = []
for i in range(N):
  Ss.append(int(input()))

C0, C1, C2, C3 = 0, 0, 0, 0
for S in Ss:
  if S == 'AC':
    C0 += 1
  elif S == 'WA':
    C1 += 1
  elif S == 'TLE':
    C2 += 1
  else:
    C3 += 1
print("AC X {}".format(C0))
print("WA X {}".format(C1))
print("TLE X {}".format(C2))
print("RE X {}".format(C3))

Fixed submission:
N = int(input())
Ss = [input() for i in range(N)]

for j in ["AC", "WA", "TLE", "RE"]:
  print("{} x {}".format(j, Ss.count(j)))
Buggy python submission (verdict: Runtime Error):
S = input().strip()
T = input().strip()
count = 0
for i in len(S):
  if S[i] == T[i]:
    count += 1
print(count)

Fixed submission:
S = input().strip()
T = input().strip()
count = 0
for i in range(len(S)):
  if S[i] != T[i]:
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
import math 
 
n = input()
if n <= 81:
  m = int(math.sqrt(n))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")

Fixed submission:
import math 
 
n = int(input())
if n <= 81:
  m = int(round(math.sqrt(n)))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import math 

n = input()
if n <= 81:
  m = int(math.sqrt(n))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")


Fixed submission:
import math 
 
n = int(input())
if n <= 81:
  m = int(round(math.sqrt(n)))
  while True:
    if n % m == 0:
      print("Yes")
      break
    else:
      m += 1
      if m >= 10:
        print("No")
        break
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import math 
 
n = int(input())
m = int(round(math.sqrt(n)))
while True:
    p, q = divmod(n, m)
    if q == 0:
        print(m + p - 2)
        break
    else:
        m += 1


Fixed submission:
import math 
 
n = int(input())
m = int(round(math.sqrt(n)))
while m >= 1:
    p, q = divmod(n, m)
    if q == 0:
        print(m + p - 2)
        break
    else:
        m -= 1
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=0
while b=<a:
    b+=1000
print(b-a)


Fixed submission:
a=int(input())
b=0
while b<a:
    b+=1000
print(b-a)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=0
while b=<a
    b+=1000
print(b-a)

Fixed submission:
a=int(input())
b=0
while b<a:
    b+=1000
print(b-a)
Buggy python submission (verdict: Runtime Error):
v=int(input())

v=v%10
if v=3:
    print("bon")
elif v%2==1:
    print("pon")
else:
    print("hon")


Fixed submission:
v=int(input())

v=v%10
if v==3:
    print("bon")
elif v==0 or v==1 or v==6 or v==8:
    print("pon")
else:
    print("hon")

Buggy python submission (verdict: Runtime Error):
v=int(input())
while v<=10:
    v=v%10
if v=3:
    print("bon")
elif v%2==1:
    print("pon")
else:
    print("hon")


Fixed submission:
v=int(input())

v=v%10
if v==3:
    print("bon")
elif v==0 or v==1 or v==6 or v==8:
    print("pon")
else:
    print("hon")

Buggy python submission (verdict: Runtime Error):
v=int(input())
while v<=10
    v=v%10
if v=3:
    print("bon")
elif v%2==1:
    print("pon")
else:
    print("hon")

Fixed submission:
v=int(input())

v=v%10
if v==3:
    print("bon")
elif v==0 or v==1 or v==6 or v==8:
    print("pon")
else:
    print("hon")
Buggy python submission (verdict: Runtime Error):
x=int(input())
i=0
u=0
while 500>=x:
    x-=500
    i+=1
while >=5:
    x-=5
    u+=1
print(5*i+u)

Fixed submission:
x=int(input())
i=0
u=0
while 500<=x:
    x-=500
    i+=1
while x>=5:
    x-=5
    u+=1
print(1000*i+5*u)
Buggy python submission (verdict: Runtime Error):
N,L = map(int, input().split())
string_list = [input() for i in range(N)]
string_list.sort()
print(''.join(string_list)


Fixed submission:
N,L = map(int, input().split())
string_list = [input() for i in range(N)]
string_list.sort()
print(''.join(string_list))
Buggy python submission (verdict: Runtime Error):
AC_Count = WA_Count = TLE_Count = RE_Count = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		AC_Count+=1
	elif s=="WA":
		WA_Count+=1
	elif s=="TLE":
		TLE_Count+=1
	else:
		RE_Count+=1
print("AC "+"x "+AC_count)
print("WA "+"x "+WA_count)
print("TLE "+"x "+TLE_count)
print("RE "+"x "+RE_count)

Fixed submission:
a = 0
w = 0
r = 0
t = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		a+=1
	elif s=="WA":
		w+=1
	elif s=="TLE":
		t+=1
	else:
		r+=1
print("AC "+"x "+str(a))
print("WA "+"x "+str(w))
print("TLE "+"x "+str(t))
print("RE "+"x "+str(r))

Buggy python submission (verdict: Runtime Error):
AC_Count = WA_Count = TLE_Count = RE_Count = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
      AC_Count+=1
    elif s=="WA":
      WA_Count+=1
    elif s=="TLE":
      TLE_Count+=1
    else:
      RE_Count+=1
print("AC "+"x "+AC_count)
print("WA "+"x "+WA_count)
print("TLE "+"x "+TLE_count)
print("RE "+"x "+RE_count)

Fixed submission:
a = 0
w = 0
r = 0
t = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		a+=1
	elif s=="WA":
		w+=1
	elif s=="TLE":
		t+=1
	else:
		r+=1
print("AC "+"x "+str(a))
print("WA "+"x "+str(w))
print("TLE "+"x "+str(t))
print("RE "+"x "+str(r))
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
XX = [set() for i in range(N)]
ans = 0
for i in range(M):
  A,B = map(int,input().split())
  XX[A-1].add(B)
  XX[B-1].add(A)
  
for i in range(N):
  for y in XX[i]:
    r = True
    if H[i]<=H[y]:
      r = False
      break
    if r:
      ans += 1

print(ans)


Fixed submission:
N,M = map(int,input().split())
H = list(map(int,input().split()))
AB = [set() for i in range(N)]
for i in range(M):
    A,B = map(int,input().split())
    AB[A-1].add(B-1)
    AB[B-1].add(A-1)
ans = 0
for i in range(N):
    res = True
    for x in AB[i]:
        if H[i]<=H[x]:
            res = False
            break
    if res:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
XX = [set() for i in range(N)]
ans = 0
for i in range(M):
  A,B = map(int,input().split())
  XX[A-1].add(B)
  XX[B-1].add(A)
  
for i in range(N):
  for y in XX[i]:
    if H[i]<=H[y]:
	    break
    else:
    	ans += 1

print(ans)


Fixed submission:
N,M = map(int,input().split())
H = list(map(int,input().split()))
AB = [set() for i in range(N)]
for i in range(M):
    A,B = map(int,input().split())
    AB[A-1].add(B-1)
    AB[B-1].add(A-1)
ans = 0
for i in range(N):
    res = True
    for x in AB[i]:
        if H[i]<=H[x]:
            res = False
            break
    if res:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
H = list(map(int,input().split()))
XX = [set() for i in range(N)]
ans = 0
for i in range(M):
  A,B = map(int,input().split())
  XX[A-1].add(B)
  XX[B-1].add(A)
  
for i in range(N):
  for y in XX[1]
  	if H[i]<=H[y]:
      break
    else:
      ans += 1
      
print(ans)

Fixed submission:
N,M = map(int,input().split())
H = list(map(int,input().split()))
AB = [set() for i in range(N)]
for i in range(M):
    A,B = map(int,input().split())
    AB[A-1].add(B-1)
    AB[B-1].add(A-1)
ans = 0
for i in range(N):
    res = True
    for x in AB[i]:
        if H[i]<=H[x]:
            res = False
            break
    if res:
        ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

b2=[]
b2.append(0)
for i in range(1,m+1):
  b2.append(b2[i-1]+b[i-1])
a.insert(0,0)
cnt=0
a_sum=0
for i in range(n+1):
  j=m
  a_sum+=a[i]
  while True:
    if k>=a_sum+b2[j]:
      cnt=max(cnt,i+j)
      break
    j-=1
    if j <0:
      break
print(cnt)

Fixed submission:
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

b2=[]
b2.append(0)
for i in range(1,m+1):
  b2.append(b2[i-1]+b[i-1])
a.insert(0,0)
cnt=0
a_sum=0
for i in range(n+1):
  j=m
  a_sum+=a[i]
  while True:
    if k>=a_sum+b2[j]:
      cnt=max(cnt,i+j)
      m=j
      break
    j-=1
    if j <0:
      break
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
X, Y, A, B, C=map(int,input().split())
rp=list(map(int,input().split()))
bp=list(map(int,input().split()))
np=list(map(int,input().split()))
rp.sort()
bp.sort()
np.sort()
count=X+Y
red=X
blue=Y
N=0
ans =0

for k in range(count):
    if red == 0:
        if np[-1] >= bp[-1]:
            ans += np[-1]
            np = np[:-1]
        else:
            ans+=bp[-1]
            bp=bp[:-1]
    elif blue == 0:
        if np[-1] >= rp[-1]:
            ans += np[-1]
            np = np[:-1]
        else:
            ans+=rp[-1]
            rp=rp[:-1]        
    elif len(np) >0:
        s = np[-1]
        if s >= rp[-1] and s >= bp[-1]:
            ans+=s
            np = np[:-1]
        else:
            if red >0:
                if blue>0:
                    if rp[-1] >= bp[-1]:
                        ans += rp[-1]
                        rp = rp[:-1]
                        red-=1
                    else:
                        ans+=bp[-1]
                        bp=bp[:-1]
                        blue-=1
                else:
                    ans += rp[-1]
                    rp = rp[:-1]
                    red-=1

            else:
                ans += bp[-1]
                bp=bp[:-1]
                blue-=-1
    elif rp[-1] >= bp[-1]:
        ans += rp[-1]
        rp = rp[:-1]
        red-=1
    else:
        ans+=bp[-1]
        bp=bp[:-1]
        blue-=1
            
print(ans)

Fixed submission:
X, Y, A, B, C=map(int,input().split())
rp=list(map(int,input().split()))
bp=list(map(int,input().split()))
np=list(map(int,input().split()))
rp.sort()
bp.sort()
np.sort()
count=X+Y
red=len(rp)-1
blue=len(bp)-1
non=len(np)-1
lb = blue-Y
lr = red -X
N=0
ans =0

for k in range(count):
    if non > -1:
        nn= np[non]
    else:
        nn =0
    if blue > lb:
        bb= bp[blue]
    else:
        bb =0
    if red > lr:
        rr= rp[red]
    else:
        rr =0
    
    if red == lr:
        if bb >= nn or non ==-1:
            ans+=bb
            blue-=1        
        else:
            ans += nn
            non-=1

    elif blue == lb:
        if rr >= nn or non ==-1:
            ans+=rr
            red-=1        
        else:
            ans += nn
            non-=1
       
    elif non > -1:
        if nn >= rr and nn >= bb:
            ans+=nn
            non-=1
        else:
            if red > lr:
                if blue> lb:
                    if rr >= bb:
                        ans += rr
                        red-=1
                    else:
                        ans+=bb
                        blue-=1
                else:
                    ans += rr
                    red-=1

            else:
                ans += bb
                blue-=1
    elif rr >= bb:
        ans += rr
        red-=1
    else:
        ans+=bb
        blue-=1
            
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
a, b ,c = map(int, input().split())
aa = math.sqrt(a)
bb = math.sqrt(b)
cc = math.aqrt(c)
if (c-a-b-2*aa*bb)/(cc+aa+bb)>0:
    print('Yes')
else:
    print('No')

Fixed submission:
import math
a, b ,c = map(int, input().split())
if 4*a*b < (c-a-b)**2 and (c-a-b) >0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N, P = map(int, input().split())
d = list(map(int, input()))
ans =0
for k in range(0,N):
    for l in range(k+1,N+1):
        num = int("".join(map(str,d[k:l])))
        
        if num % P == 0:
            ans += 1

print(ans)


Fixed submission:
S = list(map(str, input()))
q = int(input())
Q =[list(map(str, input().split())) for k in range(q)]
rev = False
f1 = []
f2 = []
def pls(n):
    global rev
    if n[0] == "1":
        rev = not rev
    else:
        if n[1] == "1":
            if rev:
                f2.append(n[2])
            else:
                f1.append(n[2])
        else:
            if rev:
                f1.append(n[2])
            else:
                f2.append(n[2])

for k in range(q):
    pls(Q[k])

if rev:
    S.reverse()
    f2.reverse()
    ans = f2 + S + f1
else:
    f1.reverse()
    ans = f1 + S + f2

print("".join(map(str, ans)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]


Fixed submission:
A, B, C = map(int, input().split())
if (A ==B and A !=C) or (B == C and A != B) or (A == C and A!=B):
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = {}
for i in range(len(L)):
    a = input()
    ans[a] = ans.get(a,0) + 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]


Fixed submission:
A, B, C = map(int, input().split())
if (A ==B and A !=C) or (B == C and A != B) or (A == C and A!=B):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]


Fixed submission:
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

t = max(ans.values())
ans2 = [k for k, v in ans.items() if v ==t ]
ans2.sort()
[print(i) for i in ans2]

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [input() for i in range(N)]
ans = {}
for i in range(len(L)):
    a = L[i]
    ans[a] = ans.get(a,0) + 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]


Fixed submission:
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

t = max(ans.values())
ans2 = [k for k, v in ans.items() if v ==t ]
ans2.sort()
[print(i) for i in ans2]

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [input() for i in range(N)]
ans = {}
for i in range(len(L)):
    a = L[i]
    if a in ans:
        ans[a] += 1
    else:
        ans[a] = 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]


Fixed submission:
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

t = max(ans.values())
ans2 = [k for k, v in ans.items() if v ==t ]
ans2.sort()
[print(i) for i in ans2]

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [input() for i in range(N)]
ans = {}
for i in range(len(L)):
    a = L[i]
    b =0
    for i in ans.keys():
        if a ==i:
            b = 1
            ans[i] += 1
            break
        else:
             continue
    if b ==0:
        ans[a] = 1

ans2 = [k for k, v in ans.items() if v == max(ans.values())]
ans2.sort()
[print(i) for i in ans2]


Fixed submission:
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

t = max(ans.values())
ans2 = [k for k, v in ans.items() if v ==t ]
ans2.sort()
[print(i) for i in ans2]

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
L = [input() for i in range(N)]
max = 0
ans = []
while(len(L) > 0):
    a = L[0]
    c = L.count(L[0])
    if c > max:
        max = c
        ans.clear()
        ans.append(L[0])
    elif c == max:
        ans.append(L[0])
    L = [i for i in L if i !=a]
ans.sort()
[print(i) for i in ans]

Fixed submission:
N = int(input())
ans = {}
for i in range(N):
    a = input()
    ans[a] = ans.get(a,0) + 1

t = max(ans.values())
ans2 = [k for k, v in ans.items() if v ==t ]
ans2.sort()
[print(i) for i in ans2]