Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
char = []
for _ in range(N):
    a = sorted(list(input()))
    char.append("".join(a))

char_count = []
cheack = [0]*N
for i in range(N-1):
    if cheack[i] == 0:
        count = 1
        for k in range(i+1,N):
            if char[i] == char[k]:
                count += 1
                cheack[k] = 1
        if count != 1:
            char_count.append(count)

ans = 0
for hoge in char_count:
    while 0 < hoge:
        hoge -= 1
        ans += hoge 
print(ans)

Fixed submission:
from collections import defaultdict
 
n = int(input())
S = [input() for _ in range(n)]

d = defaultdict(lambda: -1)
for i in range(n):
    s = ''.join(sorted(list(S[i])))
    d[s] += 1
 
ans = 0
for v in d.values():
    ans += v*(v+1)//2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
char = []
for _ in range(N):
    a = list(input())
    a.sort()
    char.append(a)

char_count = []
cheack = [0]*N
for i in range(N-1):
    if cheack[i] == 0:
        count = 1
        for k in range(i+1,N):
            if char[i] == char[k]:
                count += 1
                cheack[k] = 1
        if count != 1:
            char_count.append(count)

ans = 0
for hoge in char_count:
    while 0 < hoge:
        hoge -= 1
        ans += hoge 
print(ans)
        

Fixed submission:
from collections import defaultdict
 
n = int(input())
S = [input() for _ in range(n)]

d = defaultdict(lambda: -1)
for i in range(n):
    s = ''.join(sorted(list(S[i])))
    d[s] += 1
 
ans = 0
for v in d.values():
    ans += v*(v+1)//2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, M= map(int, input().split())

L,R = [],[]
ans = [0]*(N+1)
for i in range(M):
    a,b = map(int,input().split())
    
    for j in range(a,b+1):
        ans[j] += 1

count = 0
for i in ans:
    if i == M:
        count += 1

print(count)





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

L,R = 0,100100
ans = [0]*(N+1)
for i in range(M):
    a,b = map(int,input().split())
    L = max(L,a)
    R = min(R,b)
if R - L >= 0:
    print(R-L+1)
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
# 愚直に全探索する場合（計算量はn^3）
n = int(input())
A = list(int(i) for i in input().split())  
B = list(int(i) for i in input().split())  
C = list(int(i) for i in input().split())

count = 0
for a in A:
    for b in B:
        for c in C:
            if (a < b and b < c): 
                count += 1

print(count)

Fixed submission:
# 二分探索法を利用する場合
from bisect import bisect_left, bisect_right

N = int(input())
A = list(int(i) for i in input().split())  
B = list(int(i) for i in input().split())  
C = list(int(i) for i in input().split())

# sortの計算量はO(nlogn)
A.sort()
B.sort()
C.sort()

ans = 0
for i in range(N):
    x = bisect_left(A,B[i])
    y = bisect_right(C,B[i])
    ans += x*(N-y)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
M = 0
for P in map(int, input().split()):
    if P <= N:
        N = x
        M += 1
print(M)

Fixed submission:
N = int(input())
P = tuple(map(int, input().split()))

pmin = P[0]

m = 1

for i in range(1, N, 1):
    if P[i] < pmin:
        pmin = P[i]
        m += 1

print(m)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = tuple(map(int, input().split()))

m = 0

for i in range(0, N, 1):
    if P[i] == min(P):
        m += 1
        break
    elif P[i] == min(P[:i+1]):
        m += 1

print(m)

Fixed submission:
N = int(input())
P = tuple(map(int, input().split()))

pmin = P[0]

m = 1

for i in range(1, N, 1):
    if P[i] < pmin:
        pmin = P[i]
        m += 1

print(m)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = tuple(map(int, input().split()))

m = 0

for i in range(0, N, 1):
    if P[i] == min(P[:i+1]):
        m += 1

print(m)

Fixed submission:
N = int(input())
P = tuple(map(int, input().split()))

pmin = P[0]

m = 1

for i in range(1, N, 1):
    if P[i] < pmin:
        pmin = P[i]
        m += 1

print(m)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = tuple(map(int, input().split()))

m = 0

for i in range(0, N, 1):
    if P[i] <= min(P[:i+1]):
        m += 1

print(m)

Fixed submission:
N = int(input())
P = tuple(map(int, input().split()))

pmin = P[0]

m = 1

for i in range(1, N, 1):
    if P[i] < pmin:
        pmin = P[i]
        m += 1

print(m)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N = int(input())
P = tuple(map(int, input().split()))

m = 0

for i in range(1, N+1, 1):
    p = P[i-1]
    #print(P[:i])
    q = sorted(P[:i])[0]

    if p <= q:
        m += 1

print(m)

Fixed submission:
N = int(input())
P = tuple(map(int, input().split()))

pmin = P[0]

m = 1

for i in range(1, N, 1):
    if P[i] < pmin:
        pmin = P[i]
        m += 1

print(m)
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
if A + B >= K:
    if A >= K:
        A -= K
    else:
    B -= (K - A)
    A = 0
else:
    A, B = 0, 0
print(A, B)

Fixed submission:
A, B, K = map(int, input().split())
if A + B >= K:
    if A >= K:
        A -= K
    else:
        B -= (K - A)
        A = 0
else:
    A, B = 0, 0
print(A, B)
Buggy python submission (verdict: Runtime Error):
k = 0
int n = int(input())
for i in range(n):
  if i % 3 != 0 and i % 5 != 0:
    k += i

print(k)

Fixed submission:
k = 0
n = int(input())
for i in range(n+1):
  if i % 3 != 0 and i % 5 != 0:
    k += i
 
print(k)
Buggy python submission (verdict: Runtime Error):
w = input()
m = Map()
for t in w:
    m[t] = m.get(t, 0) + 1

for c, cnt in m:
    if cnt % 2 == 1:
        print("No")
        exit()

print("Yes")

Fixed submission:
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True

for c in w:
    p = 0
    for k in w:
        if c == k:
            p += 1
    ok = ok and (p % 2 == 0)

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

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True
h = Map()

for c in w:
    p = 0
    for k in w:
        if c == k:
            p += 1
    ok = ok and (p % 2 == 0)

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


Fixed submission:
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True

for c in w:
    p = 0
    for k in w:
        if c == k:
            p += 1
    ok = ok and (p % 2 == 0)

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

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True
h = Map()

for i in w:
    h[i] = h.get(i, 0) + 1

for key in h:
    ok = ok and (h[key] % 2 == 0)
if ok:
    print("Yes")
else:
    print("No")


Fixed submission:
#!/usr/bin/env python
#coding:utf-8

def input_strs():
    return input().split(" ")

def input_nums():
    return [int(i) for i in input_strs()]


w = input()
ok = True

for c in w:
    p = 0
    for k in w:
        if c == k:
            p += 1
    ok = ok and (p % 2 == 0)

if ok:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
 
A = list(input().split())
 
for i in range(1,N+1):
  print(A.count(str(i)))

Fixed submission:
N = int(input())
 
A = list(map(int, input().split()))
 
result = [0]*N
for i in A:
  result[i-1] +=1
  
for j in result:
  print(j)

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

A = list(input().split())

for i in range(1,N+1):
  print(A.count(str(i)))

Fixed submission:
N = int(input())
 
A = list(map(int, input().split()))
 
result = [0]*N
for i in A:
  result[i-1] +=1
  
for j in result:
  print(j)

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

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

for i in range(1,N+1):
  c = A.count(i)
  print(c)

Fixed submission:
N = int(input())
 
A = list(map(int, input().split()))
 
result = [0]*N
for i in A:
  result[i-1] +=1
  
for j in result:
  print(j)
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())

C = (N // (A + B)) + 1
S = ''
for i in range(C):
  S += 'b'*A + 'r'*B
  
print(S[:N].count('b'))

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

c1 = (N // (A + B))

c2 = (N % (A + B))
c3 = A if c2 > A else c2

print(c1*A + c3)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N = int(input())
S = list(input() for i in range(N))

d = Counter(S)
max_k_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]
ans = '\n'.join(sorted(max_k_list))
print(ans)

Fixed submission:
from collections import Counter
 
N = int(input())
S = list(input() for i in range(N))
 
d = Counter(S)

num = max(d.values())
max_k_list = [i for i,j in d.items() if j == num]

ans = '\n'.join(sorted(max_k_list))
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N = int(input())
S = list(input() for i in range(N))

d = Counter(S)
max_k_list = [kv[0] for kv in d.items() if kv[1] == max(d.values())]
ans = '\n'.join(sorted(max_k_list))
print(ans)

Fixed submission:
from collections import Counter
 
N = int(input())
S = list(input() for i in range(N))
 
d = Counter(S)

num = max(d.values())
max_k_list = [i for i,j in d.items() if j == num]

ans = '\n'.join(sorted(max_k_list))
print(ans)
Buggy python submission (verdict: Runtime Error):
s=input()
if s="ABC":
  print("ARC")
else:
  print("ABC")


Fixed submission:
s=input()
if s=="ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=int(input())
  for j in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

Fixed submission:
n,k=map(int,input().split())
hashmap=dict()
for _ in range(k):
  d=int(input())
  arr=[int(p) for p in input().split()]
  for key in arr:
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=int(input())
  for i in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

Fixed submission:
n,k=map(int,input().split())
hashmap=dict()
for _ in range(k):
  d=int(input())
  arr=[int(p) for p in input().split()]
  for key in arr:
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=int(input())
  for i in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(key)==None:
    count+=1
print(count)

Fixed submission:
n,k=map(int,input().split())
hashmap=dict()
for _ in range(k):
  d=int(input())
  arr=[int(p) for p in input().split()]
  for key in arr:
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=input()
  for i in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(key)==None:
    count+=1
print(count)

Fixed submission:
n,k=map(int,input().split())
hashmap=dict()
for _ in range(k):
  d=int(input())
  arr=[int(p) for p in input().split()]
  for key in arr:
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=input()
  for i in range(d):
    key=int(input())
    hashmap[key]=d

count=0
for i in range(1,n+1):
  if hashmap.get(key)==None:
    count+=1
print(count)

Fixed submission:
n,k=map(int,input().split())
hashmap=dict()
for _ in range(k):
  d=int(input())
  arr=[int(p) for p in input().split()]
  for key in arr:
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)
Buggy python submission (verdict: Time Limit Exceeded):

x=int(input())
value=0
index=0
hashmap=dict()
while value<int(1e9)+1:
    value=pow(index,5)
    hashmap[value]=index
    index+=1
#print(hashmap)    

for i in range(1,x+1):
    b1=x+int(pow(i,5))
    b2=x+int(pow(-i,5))
#    print(i,b1,b2)
    if hashmap.get(b1)!=None:
        print(hashmap[b1],i)
        break
    if hashmap.get(b2)!=None:
        print(hashmap[b2],-i)
        break     

Fixed submission:
x=int(input())
value=0
index=0
hashmap=dict()
while value<int(1e18)+1:
    value=pow(index,5)
    hashmap[value]=index
    index+=1

for i in range(1,1000):
    b1=x+int(pow(i,5))
    b2=x+int(pow(-i,5))
#    print(i,b1,b2)
    if hashmap.get(b1)!=None:
        print(hashmap[b1],i)
        break
    if hashmap.get(b2)!=None:
        print(hashmap[b2],-i)
        break
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 0
for i in range(n-1):
	ans += i+1
print(ans)

Fixed submission:
n = int(input())
print(n*(n-1)//2)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
cards = list(map(int, input().split()))
 
def calc():
  for i in range(m):
    b,c = map(int, input().split())
    if(min(cards) > c or b == 0):
      continue
    for i in range(b):
      if(b == 0):
        break
      card_min = min(cards)
      if(c > card_min and b > 0):
        cards.remove(card_min)
        cards.append(c)
        b -= 1
  return sum(cards)
 
print(calc())

Fixed submission:
a,b = map(int, input().split())
if(a >= 13):
  print(b)
elif(a >= 6):
  print(int(b/2))
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int, input().split())
rgb_list = [r,g,b]
rgb_list.sort()
r,g,b = rgb_list
max_y = n//g
max_z = n//b

count = 0
for y in range(max_y + 1):
    for z in range(max_z + 1):
        x_before = n - g*y - b*z
        if( (x_before / r) < 0 ):
            break
        if( (x_before % r == 0) ):
            count += 1
print(count)

Fixed submission:
def counter(r,g,b,n):
    count = 0
    max_y = n//g
    max_z = n//b

    for y in range(max_y + 1):
        for z in range(max_z + 1):
            x_before = n - g*y - b*z
            if( (x_before / r) < 0 ):
                break
            if( (x_before % r == 0) ):
                count += 1
    return count

r,g,b,n = map(int, input().split())
print(counter(r,g,b,n))

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int, input().split())
max_y = n//g
max_z = n//b

count = 0
for y in range(max_y + 1):
    for z in range(max_z + 1):
        x_before = n - g*y - b*z
        if( (x_before / r) < 0 ):
            break
        if( (x_before % r == 0) ):
            count += 1
print(count)

Fixed submission:
def counter(r,g,b,n):
    count = 0
    max_y = n//g
    max_z = n//b

    for y in range(max_y + 1):
        for z in range(max_z + 1):
            x_before = n - g*y - b*z
            if( (x_before / r) < 0 ):
                break
            if( (x_before % r == 0) ):
                count += 1
    return count

r,g,b,n = map(int, input().split())
print(counter(r,g,b,n))

Buggy python submission (verdict: Time Limit Exceeded):
r,g,b,n = map(int, input().split())
max_y = n//g
max_z = n//b

count = 0
for y in range(max_y + 1):
    for z in range(max_z + 1):
        x_before = n - g*y - b*z 
        if( (x_before % r == 0) and (x_before / r) >=0 ):
            count += 1
print(count)

Fixed submission:
def counter(r,g,b,n):
    count = 0
    max_y = n//g
    max_z = n//b

    for y in range(max_y + 1):
        for z in range(max_z + 1):
            x_before = n - g*y - b*z
            if( (x_before / r) < 0 ):
                break
            if( (x_before % r == 0) ):
                count += 1
    return count

r,g,b,n = map(int, input().split())
print(counter(r,g,b,n))
Buggy python submission (verdict: Runtime Error):
import math 

n = int(input())
monsters = list(map(int, input().split()))

for i in range(1,n):
    monsters[i] = math.gcd(monsters[i],monsters[i-1])
print(monsters[n-1])

Fixed submission:
import fractions 

n = int(input())
monsters = list(map(int, input().split()))

for i in range(1,n):
    monsters[i] = fractions.gcd(monsters[i],monsters[i-1])
print(monsters[n-1])
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
h = list(map(int,input().split()))

def calc():
  dp = [0]*n
  for i in range(n):
    tmp = []
    for j in range(1,k+1):
      if i-j >= 0:
          tmp.append(dp[i-j] + abs(h[i]-h[i-j]))
    dp[i] = min(tmp) if len(tmp) != 0 else 0
  return dp[n-1]

print(calc())

Fixed submission:
n, k = map(int, input().split())
h = list(map(int,input().split()))

def calc():
  dp = [0]*n
  for i in range(n):
    tmp = []
    for j in range(1,k+1):
      if i-j >= 0:
          tmp.append(dp[i-j] + abs(h[i]-h[i-j]))
    dp[i] = min(tmp) if len(tmp) != 0 else 0
  return dp[n-1]

print(calc())

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
h = list(map(int,input().split()))
dp = [0]*n
for i in range(n):
  tmp = []
  for j in range(1,k+1):
    if i-j >= 0:
    	tmp.append(dp[i-j] + abs(h[i]-h[i-j]))
  dp[i] = min(tmp) if len(tmp) != 0 else 0
print(dp[n-1])

Fixed submission:
n, k = map(int, input().split())
h = list(map(int,input().split()))

def calc():
  dp = [0]*n
  for i in range(n):
    tmp = []
    for j in range(1,k+1):
      if i-j >= 0:
          tmp.append(dp[i-j] + abs(h[i]-h[i-j]))
    dp[i] = min(tmp) if len(tmp) != 0 else 0
  return dp[n-1]

print(calc())
Buggy python submission (verdict: Runtime Error):
num = int(input())
actions = []
for i in range(num):
    actions.append(list(map(int, input().split())))

dp = [[0 if j != 0 else actions[i][j] for i in range(3)] for j in range(num)]
for i in range(num) if i != 0:
    dp[i][0] = max(dp[i-1][1], dp[i-1][2]) + actions[i][0]
    dp[i][1] = max(dp[i-1][0], dp[i-1][2]) + actions[i][1]
    dp[i][2] = max(dp[i-1][0], dp[i-1][1]) + actions[i][2]

print(max( dp[num-1][0], dp[num-1][1] ,dp[num-1][2] ))

Fixed submission:
num = int(input())
actions = []
for i in range(num):
    actions.append(list(map(int, input().split())))

dp = [[0 for i in range(3)] for j in range(num)]
for i in range(num):
    if i == 0:
        dp[i][0] = actions[i][0]
        dp[i][1] = actions[i][1]
        dp[i][2] = actions[i][2]
    else:
        dp[i][0] = max(dp[i-1][1] + actions[i][0], dp[i-1][2] + actions[i][0])
        dp[i][1] = max(dp[i-1][0] + actions[i][1], dp[i-1][2] + actions[i][1])
        dp[i][2] = max(dp[i-1][0] + actions[i][2], dp[i-1][1] + actions[i][2])

print(max( dp[num-1][0], dp[num-1][1] ,dp[num-1][2] ))

Buggy python submission (verdict: Runtime Error):
num = int(input())
actions = []
for i in range(num):
    actions.append(list(map(int, input().split())))

dp = [[0 if j != 0 else actions[i][j] for i in range(3)] for j in range(num)]
for i in range(num):
    dp[i][0] = max(dp[i-1][1], dp[i-1][2]) + actions[i][0]
    dp[i][1] = max(dp[i-1][0], dp[i-1][2]) + actions[i][1]
    dp[i][2] = max(dp[i-1][0], dp[i-1][1]) + actions[i][2]

print(max( dp[num-1][0], dp[num-1][1] ,dp[num-1][2] ))

Fixed submission:
num = int(input())
actions = []
for i in range(num):
    actions.append(list(map(int, input().split())))

dp = [[0 for i in range(3)] for j in range(num)]
for i in range(num):
    if i == 0:
        dp[i][0] = actions[i][0]
        dp[i][1] = actions[i][1]
        dp[i][2] = actions[i][2]
    else:
        dp[i][0] = max(dp[i-1][1] + actions[i][0], dp[i-1][2] + actions[i][0])
        dp[i][1] = max(dp[i-1][0] + actions[i][1], dp[i-1][2] + actions[i][1])
        dp[i][2] = max(dp[i-1][0] + actions[i][2], dp[i-1][1] + actions[i][2])

print(max( dp[num-1][0], dp[num-1][1] ,dp[num-1][2] ))
Buggy python submission (verdict: Runtime Error):
d = int(input())
print('Christmas' if d==25 else ('Christmas Eve' if d==24 else ( 'Christmas Eve Eve' if d == 23 else ( 'Christmas Eve Eve Eve' if d == 22 else  ) ) ))

Fixed submission:
d = int(input())
print('Christmas' if d==25 else ('Christmas Eve' if d==24 else ( 'Christmas Eve Eve' if d == 23 else ( 'Christmas Eve Eve Eve' if d == 22 else ''  ) ) ))
Buggy python submission (verdict: Runtime Error):
import sys
n = int(input())
if n == 1:
	print('Hello World)
	sys.exit()
print(sum([int(input()) for _ in range(2)]))

Fixed submission:
import sys
n = int(input())
if n == 1:
	print('Hello World')
	sys.exit()
print(sum([int(input()) for _ in range(2)]))

Buggy python submission (verdict: Runtime Error):
n = int(input())
num = [int(input()) for _ in range(2)]
print('Hello World' if n == 1 else sum(num))

Fixed submission:
import sys
n = int(input())
if n == 1:
	print('Hello World')
	sys.exit()
print(sum([int(input()) for _ in range(2)]))
Buggy python submission (verdict: Runtime Error):
a,b = input().split
num = int(a+b)
print('Yes' if float(num**0.5) else 'No')

Fixed submission:
import sys
a,b = input().split()
num = int(a+b)
i=1
while(i<=num**0.5):
	if(i**2 == num):
		print('Yes')
		sys.exit()
	i += 1
print('No')

Buggy python submission (verdict: Runtime Error):
import math
a,b = input().split
num = int(a+b)
print('Yes' if is_integer(math.sqrt(num)) else 'No')

Fixed submission:
import sys
a,b = input().split()
num = int(a+b)
i=1
while(i<=num**0.5):
	if(i**2 == num):
		print('Yes')
		sys.exit()
	i += 1
print('No')
Buggy python submission (verdict: Runtime Error):
s = input()
s[3] = '7'
print(s)

Fixed submission:
s = input()
print(s[:3]+'8'+s[4:])
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = []
for _ in range(n):
	l.append(int(input()))
list(set(l.sorted()))
print(len(l))

Fixed submission:
n = int(input())
l = []
for _ in range(n):
	l.append(int(input()))
print(len(list(set(l))))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()
if(len(s) != a+b+1 or s[a] != '-'):
	print('No')
	sys.exit()
print('Yes')

Fixed submission:
import sys
a, b = map(int, input().split())
s = input()
if(s.count('-') == 1 and s[a] == '-'):
	print('Yes')
	sys.exit()
print('No')
Buggy python submission (verdict: Runtime Error):
import sys
s = input()
ans = {}
for i in s:
  if i in ans:
    ans[i] +=1
  else:
    ans[i] = 0
for i in ans:
  if i%2 !=0:
    print('No')
    sys.exit()
print('Yes')

Fixed submission:
import sys
s = input()
ans = {}
for i in s:
  if i in ans:
    ans[i] +=1
  else:
    ans[i] = 1
for i in ans.values():
  if i%2!=0:
    print('No')
    sys.exit()
print('Yes')

Buggy python submission (verdict: Runtime Error):
import sys
s = input()
ans = ['a':0,'b':0,'c':0]
for i in s:
	if i in ans:
		ans[i] +=1
    else:
		print('NO')
        sys.exit()
print('YES' if (ans['a']%2==0 and ans['a']%2==0 and ans['a']%2==0) else 'NO')

Fixed submission:
import sys
s = input()
ans = {}
for i in s:
  if i in ans:
    ans[i] +=1
  else:
    ans[i] = 1
for i in ans.values():
  if i%2!=0:
    print('No')
    sys.exit()
print('Yes')
Buggy python submission (verdict: Runtime Error):
print('YES' if (input().split().count('5')==2 and input().split().count('7')==1) else 'NO')

Fixed submission:
s = input().split()
print('YES' if s.count('5')==2 and s.count('7')==1 else 'NO')

Buggy python submission (verdict: Runtime Error):
print('YES' if input().split().count('5')==2 and input().split().count('7')==1 else 'NO')

Fixed submission:
s = input().split()
print('YES' if s.count('5')==2 and s.count('7')==1 else 'NO')