Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N,M,X = map(int,input().split())
li = []
import numpy as np
C = []

for _ in range(N):
    c,*a = map(int,input().split())
    li.append(np.array(a))
    C.append(c)

counter = []

for i in range(1<<N):
    skill_li = np.zeros(M).astype(int)
    sum_price = 0
    for k in range(N):
        if (i>>k) & 1:
            skill_li += li[k]
            sum_price += C[k]
    if all(skill_li>=X):
        counter.append(sum_price)

if len(counter)==0:
    print(-1)
else:
    print(min(counter))

Fixed submission:
N,M,X = map(int,input().split())
li = []
import numpy as np
C = []

for _ in range(N):
    c,*a = map(int,input().split())
    li.append(np.array(a))
    C.append(c)

counter = []

for i in range(1<<N):
    skill_li = np.zeros(M).astype(int)
    sum_price = 0
    for k in range(N):
        if (i>>k) & 1:
            skill_li += li[k]
            sum_price += C[k]
    if all(skill_li>=X):
        counter.append(sum_price)

if len(counter)==0:
    print(-1)
else:
    print(min(counter))

Buggy python submission (verdict: Runtime Error):
N,M,X = map(int,input().split())
li = []
import numpy as np
C = []

for _ in range(M):
    c,*a = map(int,input().split())
    li.append(np.array(a))
    C.append(c)

counter = []

for i in range(1<<N):
    skill_li = np.zeros(M)
    sum_price = 0
    for k in range(N):
        if (i>>k) & 1:
            skill_li += li[k]
            sum_price += C[k]
    if all(skill_li>=X):
        counter.append(sum_price)
if len(counter)==0:
    print(-1)
else:
    print(min(counter))

Fixed submission:
N,M,X = map(int,input().split())
li = []
import numpy as np
C = []

for _ in range(N):
    c,*a = map(int,input().split())
    li.append(np.array(a))
    C.append(c)

counter = []

for i in range(1<<N):
    skill_li = np.zeros(M).astype(int)
    sum_price = 0
    for k in range(N):
        if (i>>k) & 1:
            skill_li += li[k]
            sum_price += C[k]
    if all(skill_li>=X):
        counter.append(sum_price)

if len(counter)==0:
    print(-1)
else:
    print(min(counter))

Buggy python submission (verdict: Runtime Error):
N,M,X = map(int,input().split())
li = []
import numpy as np
C = []

for _ in range(M):
    c,*a = map(int,input().split())
    li.append(np.array(a))
    C.append(c)

counter = []

for i in range(1<<N):
    skill_li = np.zeros(M)
    sum_price = 0
    for k in range(N):
        if (i>>k) & 1:
            skill_li += li[k]
            sum_price += C[k]
    if all(skill_li>=X):
        counter.append(sum_price)
if len(counter)==0:
    print(-1)
else:
    print(min(counter))

Fixed submission:
N,M,X = map(int,input().split())
li = []
import numpy as np
C = []

for _ in range(N):
    c,*a = map(int,input().split())
    li.append(np.array(a))
    C.append(c)

counter = []

for i in range(1<<N):
    skill_li = np.zeros(M).astype(int)
    sum_price = 0
    for k in range(N):
        if (i>>k) & 1:
            skill_li += li[k]
            sum_price += C[k]
    if all(skill_li>=X):
        counter.append(sum_price)

if len(counter)==0:
    print(-1)
else:
    print(min(counter))
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int,input().split()))

counter = 0
place_list = []
next = 1
while True:
    
    if  next in place_list:
        break
        
    else:
        place_list.append(next)
        next = A[next-1]
        
    counter += 1

duration_cycle = len(place_list)- place_list.index(next)
if K <len(place_list):
    print(place_list[K])
else:
    print(place_list[(K-place_list.index(next))%duration_cycle+place_list.index(next)])


Fixed submission:
N,K = map(int,input().split())
A = list(map(int,input().split()))

counter = 0
place_list = []
place_set = set()
next = 1
while True:
    
    if  next in place_set:
        break
        
    else:
        place_list.append(next)
        place_set.add(next)
        next = A[next-1]
        
    counter += 1

duration_cycle = len(place_list)- place_list.index(next)
if K <len(place_list):
    print(place_list[K])
else:
    print(place_list[(K-place_list.index(next))%duration_cycle+place_list.index(next)])
Buggy python submission (verdict: Time Limit Exceeded):
N,M,K = map(int, input().split())
import math

counter =0

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def painting(length,color_num):
    return color_num*(color_num-1)**(length-1)

for k in range(K+1):
    counter += combinations_count(N-1,k)*painting(N-k,M)
    counter %= 998244353



all = counter 
print(all)

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

p = 998244353

factorial = [1]
counter = 0
for i in range(1,N+1):
    factorial.append(factorial[i-1]*i%p)



for k in range(K+1):
    counter += factorial[N-1]*pow(factorial[k],p-2,p)*pow(factorial[N-k-1],p-2,p)*M*pow(M-1,N-1-k,p)
print(counter%p)

Buggy python submission (verdict: Time Limit Exceeded):
N,M,K = map(int, input().split())
import math

counter =0

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def painting(length,color_num):
    return color_num*(color_num-1)**(length-1)

for k in range(K+1):
    counter += combinations_count(N-1,k)*painting(N-k,M)



all = counter 
print(all%998244353)


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

p = 998244353

factorial = [1]
counter = 0
for i in range(1,N+1):
    factorial.append(factorial[i-1]*i%p)



for k in range(K+1):
    counter += factorial[N-1]*pow(factorial[k],p-2,p)*pow(factorial[N-k-1],p-2,p)*M*pow(M-1,N-1-k,p)
print(counter%p)

Buggy python submission (verdict: Time Limit Exceeded):
N,M,K = map(int, input().split())
import math

counter =0

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def painting(length,color_num):
    return color_num*(color_num-1)**(length-1)

for k in range(1,K+1):
    counter += combinations_count(N-1,k)*painting(N-k,M)



all = counter + painting(N,M)
print(all%998244353)


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

p = 998244353

factorial = [1]
counter = 0
for i in range(1,N+1):
    factorial.append(factorial[i-1]*i%p)



for k in range(K+1):
    counter += factorial[N-1]*pow(factorial[k],p-2,p)*pow(factorial[N-k-1],p-2,p)*M*pow(M-1,N-1-k,p)
print(counter%p)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
k = list(map(int,input().split()))
counter = 0
for i in range(N):
    for l in range(i):
        if i-l== k[i]+k[l]:
            counter+=1
print(counter)

Fixed submission:
N = int(input())

A = map(int,input().split())



li = [[0]*N,[0]*N ]

for index,a in enumerate(A):
    li[0][index] = a- index
    li[1][index]= -a - index


from collections import Counter


cou_one = Counter(li[0])
cou_two = Counter(li[1])




counter = 0
for key,value in cou_one.items():
    counter += cou_two[key]*value


print(counter)
Buggy python submission (verdict: Runtime Error):
K  = int(input())
A,B = map(int,input().split())

if B-A>=K-1:
    print("OK")
elif A%K > B%K:
    print("OK")
elif A%K=0 or B%K=0:
    print("OK")
else:
    print("NG")

Fixed submission:
K  = int(input())
A,B = map(int,input().split())

if B-A>=K-1:
    print("OK")
elif A%K > B%K:
    print("OK")
elif A%K==0 or B%K==0:
    print("OK")
else:
    print("NG")

Buggy python submission (verdict: Runtime Error):
K  = int(input())
A,B = map(int,input().split())

if B-A>=K-1:
    print("OK")
elif A%K > B%K:
    print("OK")
elif A%K=0 or b%K=0:
    print("OK")
else:
    print("NG")

Fixed submission:
K  = int(input())
A,B = map(int,input().split())

if B-A>=K-1:
    print("OK")
elif A%K > B%K:
    print("OK")
elif A%K==0 or B%K==0:
    print("OK")
else:
    print("NG")
Buggy python submission (verdict: Runtime Error):
N,M,Q = map(int,input().split())
li = []
counter = 0
n = []
for s in range(Q):
  li.append(list(map(int,input().strip())))

for i in range(10**(N-1),10**N):
  k = str(i)
  for q in range(Q):
    if k[li[q][1]] -  k[li[q][0]] ==  k[li[q][2]]:
      counter +=  k[li[q][3]]
    n.append(counter)
    counter = 0
print(max(n))

Fixed submission:
N,M,Q = map(int,input().split())

li = [list(map(int,input().split())) for i in range(Q) ]

from itertools import combinations_with_replacement
counter = []

for comb in combinations_with_replacement(range(1,M+1),N):
    A = list(comb)
    tmp = 0
   
    for i in li:
        if A[i[1]-1] - A[i[0]-1] == i[2]:
            tmp += i[3]

    counter.append(tmp)


print(max(counter))

Buggy python submission (verdict: Runtime Error):
N,M,Q = map(int,input().split())
li = []
counter = 0
n = []
for s in range(Q):
  li.append(list(map(int,input().strip())))

for i in range(10**(N-1),10**N):
  k = str(i)
  for q in range(Q):
    if k[li[q][1]] -  k[li[q][0]] ==  k[li[q][2]]:
      counter +=  k[li[q][3]]
    n.append(counter)
    counter = 0
print(max)

Fixed submission:
N,M,Q = map(int,input().split())

li = [list(map(int,input().split())) for i in range(Q) ]

from itertools import combinations_with_replacement
counter = []

for comb in combinations_with_replacement(range(1,M+1),N):
    A = list(comb)
    tmp = 0
   
    for i in li:
        if A[i[1]-1] - A[i[0]-1] == i[2]:
            tmp += i[3]

    counter.append(tmp)


print(max(counter))
Buggy python submission (verdict: Time Limit Exceeded):
A,B,N = map(int,input().split())
max_ = 0
for x in range(1,N+1):
    C = (A*x)//B - A*(x//B)
    if C > max_:
        max_ = C
print(max_)

Fixed submission:
A,B,N = map(int,input().split())
if B-1>N:
    x = N
else :
    x = B-1
print( (A*x)//B - A*(x//B))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
li = []
for i in range(N):
    k = input()
    if not k in li :
        li.append(k)
print(len(li))

Fixed submission:
N = int(input())
li = []
for i in range(N):
    li.append(input())
print(len(set(li)))
Buggy python submission (verdict: Runtime Error):
 print(int(input())*6.3)


Fixed submission:
print(int(input())*6.3)

Buggy python submission (verdict: Runtime Error):
import math
print(2*math.pi*R)

Fixed submission:
print(int(input())*6.3)

Buggy python submission (verdict: Runtime Error):
print(2*pi)

Fixed submission:
print(int(input())*6.3)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - conter>=0:
    print(N-counter)
else:
    print(-1)

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - counter>=0:
    print(N-counter)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - conter>=0:
    print(N-counter)
else:
    print("-1")

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - counter>=0:
    print(N-counter)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - conter>=0:
    print(N-counter)
else:
    priont("-1")

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - counter>=0:
    print(N-counter)
else:
    print(-1)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input()))
counter = 0

for i in range(M):
    counter += A[i]
    
print(N-counter)


Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
counter = 0
for i in range(M):
    counter += A[i]
    
if N - counter>=0:
    print(N-counter)
else:
    print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd
counter = 0
K = int(input())
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            d = gcd(a,b)
            counter += gcd(c,d)


print(counter)

Fixed submission:
from math import gcd
counter = 0
K = int(input())
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            d = gcd(a,b)
            counter += gcd(c,d)


print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
counter = 0

for k in range(2,N):
    for j in range(1,k):
        for i in range(j):
            if k-j==j-i or S[i]==S[j] or S[j]==S[k] or S[i]==S[k]:
                counter += 1

all = int(N*(N-1)*(N-2)/6)
print(all-counter)


Fixed submission:
N = int(input())
S = input()
counter = 0

for i in range(N-2):
    for j in range(i+1,(N+i-1)//2+1):
        k = 2*j-i
        if not S[i]==S[j] and  not S[j]==S[k] and not S[i]==S[k]:
            counter += 1

rgb = S.count("R")*S.count("G")*S.count("B")
print(rgb-counter)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

counter = 0
for k in range(N):
    for j in range(k):
        if S[k]==S[j]: 
            continue
        else:       
            for i in range(j):
                if  (not S[i]==S[k]) and (not S[j]==S[i]) and (not(j-i==k-j)):
                    counter += 1
                
print(counter)

Fixed submission:
N = int(input())
S = input()
counter = 0

for i in range(N-2):
    for j in range(i+1,(N+i-1)//2+1):
        k = 2*j-i
        if not S[i]==S[j] and  not S[j]==S[k] and not S[i]==S[k]:
            counter += 1

rgb = S.count("R")*S.count("G")*S.count("B")
print(rgb-counter)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()

counter = 0
for k in range(N):
    for j in range(k):
        for i in range(j):
            if (not S[i]==S[j]) and (not S[i]==S[k]) and (not S[j]==S[k]) and not(j-i==k-j):
                counter += 1
print(counter)

Fixed submission:
N = int(input())
S = input()
counter = 0

for i in range(N-2):
    for j in range(i+1,(N+i-1)//2+1):
        k = 2*j-i
        if not S[i]==S[j] and  not S[j]==S[k] and not S[i]==S[k]:
            counter += 1

rgb = S.count("R")*S.count("G")*S.count("B")
print(rgb-counter)
Buggy python submission (verdict: Runtime Error):
S = input()
if S[2]==S[3] and S[4]==S[5]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()
if S[2]==S[3] and S[4]==S[5]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
from collections import deque
N,X,Y = map(int,input().split())

concat = [[i,i+2] if not (i==0 or i==N-1) else [] for i in range(N)]
concat[0].append(2)
concat[N-1].append(N-1)
concat[X-1].append(Y)
concat[Y-1].append(X)


def bfs():
    #global que
    if len(que)==0:
        return
    out = que.popleft()
    for out_element in concat[out-1]:
        if check[out_element-1]==-1:
            check[out_element-1] = check[out-1]+1
            que.append(out_element)
    bfs()


li_=[0 for i in range(N)]
for i in range(1,N+1):
    check = [-1 for k in range(N)]
    check[i-1]=0
    que = deque([i])
    bfs()
    for i in range(N):
        li_[i] += check.count(i)


    
for i in range(1,N):
    print(li_[i]//2)

Fixed submission:
N,X,Y = map(int,input().split())
from itertools import combinations
counter = [0]*(N+1)

for com in combinations(range(N),2):
    i,j = com
    min_path = min(j-i,abs(X-1-i)+abs(Y-1-j)+1)
    counter[min_path]+=1

for i in range(1,N):
    print(counter[i])
Buggy python submission (verdict: Runtime Error):
A,B,M = map(int,input().split())
A_li = list(map(int,input().split()))
B_li = list(map(int,input().split()))

inf = float("inf")
posibility = inf

for m in range(M):
    x,y,c=map(int,input().split())
    tmp_posibility=A_li[x-1]+B_li[y-1]-c
    posibility=min(posibility,tmp_posibility)
 

no_c = min(A_li)+min(B_li)
decition = min(posibility,no_c)

print(decition)

Fixed submission:
S = input()
l = len(S)


judge=True
if l%2==0:
    for i in range(l//2):
        if not S[2*i:2*(i+1)]=="hi":
            judge=False
    if judge:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
A,B,M = map(int,input().split())
A_li = list(map(int,input().split()))
B_li = list(map(int,input().split()))
X = set()
Y = set()
inf = float("inf")
posibility = inf

for m in range(M):
    x,y,c=map(int,input().split())
    tmp_posibility=A_li[x-1]+B_li[y-1]-c
    posibility=min(posibility,tmp_posibility)
    X.add(x)
    Y.add(y)

import itertools 
a_li = set(A_li)-X
b_li = set(B_li)-Y

for a,b in itertools.product(a_li,b_li):
    tmp_posibility = a+b
    posibility = min(posibility,tmp_posibility)



print(posibility)

Fixed submission:
A,B,M = map(int,input().split())
A_li = list(map(int,input().split()))
B_li = list(map(int,input().split()))

inf = float("inf")
posibility = inf

for m in range(M):
    x,y,c=map(int,input().split())
    tmp_posibility=A_li[x-1]+B_li[y-1]-c
    posibility=min(posibility,tmp_posibility)
 

no_c = min(A_li)+min(B_li)
decition = min(posibility,no_c)

print(decition)
Buggy python submission (verdict: Runtime Error):
import math
A_se = set()
B_se = set()

for i in range(math.ceil(A/0.08),math.ceil((A+1)/0.08)):
    A_se.add(i)

for i in range(math.ceil(B/0.1),math.ceil((B+1)/0.1)):
    B_se.add(i)

C = A_se & B_se
if len(C)==0:
    print(-1)
else:
    print(min(C))

Fixed submission:
A,B = map(int,input().split())
import math
A_se = set()
B_se = set()

for i in range(math.ceil(A/0.08),math.ceil((A+1)/0.08)):
    A_se.add(i)

for i in range(math.ceil(B/0.1),math.ceil((B+1)/0.1)):
    B_se.add(i)

C = A_se & B_se
if len(C)==0:
    print(-1)
else:
    print(min(C))
Buggy python submission (verdict: Runtime Error):
S = input()
Q = int(input())
counter =0

for q in range(Q):
    inpu_ = input()
    if len(inpu_)==1:
        counter += 1
    else:
        a,f,c = map(str,inpu_.split())
        if f=="1":
            if counter%2 == 1:
                S = S+c
            else:
                S = c+S

        else:
            if counter%2==1:
                S = c+S
            else: 
                S = S+c

if counter%2==1:
    S.reverse()
print(S)


Fixed submission:
S = input()
Q = int(input())
flag = True
from collections import deque
que=deque(S)

for i in range(Q):
    a = input().split()
    if a[0]=="1":
        flag = not flag

    else:
        f = a[1]
        c = a[2]
        if f=="1":
            if flag:
                que.appendleft(c)
            else:
                que.append(c)
        else:
            if flag:
                que.append(c)
            else:
                que.appendleft(c)

if not flag:
    que.reverse()

print("".join(que))

Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
Q = int(input())
counter =0

for q in range(Q):
    inpu_ = input()
    if len(inpu_)==1:
        counter += 1
    else:
        a,f,c = map(str,inpu_.split())
        if f=="1":
            if counter%2 == 1:
                S.append(c)
            else:
                S.insert(0,c)

        else:
            if counter%2==1:
                S.insert(0,c)
            else: 
                S.append(c)

if counter%2==1:
    S.reverse()
print("".join(S))


Fixed submission:
S = input()
Q = int(input())
flag = True
from collections import deque
que=deque(S)

for i in range(Q):
    a = input().split()
    if a[0]=="1":
        flag = not flag

    else:
        f = a[1]
        c = a[2]
        if f=="1":
            if flag:
                que.appendleft(c)
            else:
                que.append(c)
        else:
            if flag:
                que.append(c)
            else:
                que.appendleft(c)

if not flag:
    que.reverse()

print("".join(que))

Buggy python submission (verdict: Time Limit Exceeded):
S = list(input())
Q = int(input())

for _ in range(Q):
    inpu_ = input()
    if len(inpu_)==1:
        S.reverse()
    else:
        a,f,c = map(str,inpu_.split())
        if f=="1":
            S.insert(0,c)
        else:
            S.append(c)

print("".join(S))


Fixed submission:
S = input()
Q = int(input())
flag = True
from collections import deque
que=deque(S)

for i in range(Q):
    a = input().split()
    if a[0]=="1":
        flag = not flag

    else:
        f = a[1]
        c = a[2]
        if f=="1":
            if flag:
                que.appendleft(c)
            else:
                que.append(c)
        else:
            if flag:
                que.append(c)
            else:
                que.appendleft(c)

if not flag:
    que.reverse()

print("".join(que))
Buggy python submission (verdict: Runtime Error):
N,P = map(int,input().split())
S = input()
S_li = [0]*(N+1)
S_rev = reversed(S)
counter = 0
tmp = 0
count= 0
from  collections import Counter

if 10%P==0:
    for i,num in enumerate(S_rev):
        if num==str(P) or num=="0":
            counter += N-i
    print(counter)

else:
    ctr = [0] * P
    ctr[0] = 1
 
    ret = 0
    t = 0
    c = 1
    for x in S_rev:
        t = (t + c * x) % P
        ret += ctr[t]
        ctr[t] += 1
        c = c * 10 % P
 
    print(ret)

Fixed submission:
N,P = map(int,input().split())
S = map(int,input())
S_li = [0]*(N+1)
S_rev = reversed(tuple(S))

tmp = 0
count= 0
from  collections import Counter

if 10%P==0:
    counter = 0
    for i,num in enumerate(S_rev):
        if num%P==0:
            counter += N-i
    print(counter)

else:
    ctr = [0] * P
    ctr[0] = 1
    ret = 0
    t = 0
    c = 1
    for x in S_rev:
        t = (t + c * x) % P
        ret += ctr[t]
        ctr[t] += 1
        c = c * 10 % P
 
    print(ret)
Buggy python submission (verdict: Runtime Error):
from functools import reduce

def comb(n,k,p):
    if k==0:
        return 1
    A = reduce(lambda x,y:x*y%p ,[n-k+1+i for i in range(k)])
    B = reduce(lambda x,y:x*y%p ,[i+1 for i in range(k)])
    return A*pow(B,p-2,p)%p

n,K = map(int,input().split())
p = pow(10,9)+7
counter = 0

for k in range(K+1):
    counter += comb(n-1,n-k-1,p)*comb(n,k,p)

print(counter)

Fixed submission:
n,k = map(int,input().split())
p = pow(10,9)+7
li = [1]*(n+2)

counter = 0
k = min(k,n-1)

for a in range(1,n+1):
    li[a] = a*li[a-1]%p

def comb(a,b):
    if b<1:
        return 1
    return li[a]*pow(li[b],p-2,p)*pow(li[a-b],p-2,p)


for i in range(k+1):
    counter += comb(n,i)*comb(n-1,i)%p
    #nCi*  (n-1)Cn-i-1


    #n人をn-iのぐるーぷに分ける

print(counter%p)
Buggy python submission (verdict: Runtime Error):
A = set(int,input().split())

if len(A)==2:
    print("Yes")
else:
    print("No")

Fixed submission:
A = set(map(int,input().split()))

if len(A)==2:
    print("Yes")
else:
    print("No")