Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
x = int(input(""))
l = list()
flag = 0
temp= [int(x) for x in input().split()]
for i in range(0, x):
     
    if temp[i] in l:
        flag = 1
    if temp[i] not in l:
        l.append(temp[i])
if flag == 1:
    print("NO")
else:
    print("YES")



Fixed submission:
x = int(input(""))
l = list()
flag = 0
arr = [int(x) for x in input().split()]
arr2=set(arr)
l=len(arr)
l2=len(arr2)
if l!=l2:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
x = int(input(""))
l = list()
flag = 0
for i in range(0, x):
    temp = input("")
    if temp in l:
        flag = 1
    if temp not in l:
        l.append(temp)
if flag == 1:
    print("NO")
else:
    print("YES")



Fixed submission:
x = int(input(""))
l = list()
flag = 0
arr = [int(x) for x in input().split()]
arr2=set(arr)
l=len(arr)
l2=len(arr2)
if l!=l2:
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
L = list()
L = [int(x) for x in input().split()]



def prob(x):
    out = 0.0

    out = (1 / x) * (x*(x+1))/2

    return out


final = 0.0
answer=list()
for i in range(0, N):
    final=0.0
    for j in range(i, K+i):
        if K+i<=N:
            div = L[j]
            final = final + prob(div)
    answer.append(final)

print("%14.12f"%max(answer))

Fixed submission:
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
L = list()
L = [int(x) for x in input().split()]



def prob(x):
    out = 0.0

    out = (x+1)/2

    return out


# final = 0.0
# answer=list()
# for i in range(0, N):
#     final=0.0
#     for j in range(i, K+i):
#         if K+i<=N:
#             div = L[j]
#             final = final + prob(div)
#     answer.append(final)
#
# print("%14.12f"%max(answer))


res=0.0
tres=0.0
for i in range(0,K):
    tres+=prob(L[i])
    res=max(res,tres)
rindex=K
lindex=0
while rindex<N:
    tres=tres-prob(L[lindex])+prob(L[rindex])
    rindex+=1
    res=max(res,tres)
    lindex+=1
print("%14.12f"%res)

Buggy python submission (verdict: Time Limit Exceeded):
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
L = list()
L = [int(x) for x in input().split()]



def prob(x):
    out = 0.0
    for i in range(1, x + 1):
        out = out + (1 / x) * i

    return out


final = 0.0
answer=list()
for i in range(0, N):
    final=0.0
    for j in range(i, K+i):
        if K+i<=N:
            div = L[j]
            final = final + prob(div)
    answer.append(final)
print("%14.12f"%max(answer))

Fixed submission:
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
L = list()
L = [int(x) for x in input().split()]



def prob(x):
    out = 0.0

    out = (x+1)/2

    return out


# final = 0.0
# answer=list()
# for i in range(0, N):
#     final=0.0
#     for j in range(i, K+i):
#         if K+i<=N:
#             div = L[j]
#             final = final + prob(div)
#     answer.append(final)
#
# print("%14.12f"%max(answer))


res=0.0
tres=0.0
for i in range(0,K):
    tres+=prob(L[i])
    res=max(res,tres)
rindex=K
lindex=0
while rindex<N:
    tres=tres-prob(L[lindex])+prob(L[rindex])
    rindex+=1
    res=max(res,tres)
    lindex+=1
print("%14.12f"%res)
Buggy python submission (verdict: Runtime Error):
import math
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
l=[int(x) for x in input().split()]
SUM=sum(l)
if N-SUM

Fixed submission:
import math
query=[int(x) for x in input().split()]
N = query[0]
K = query[1]
l=[int(x) for x in input().split()]
SUM=sum(l)
if N-SUM<=0:
    print("Yes")
else:
   print("No")
Buggy python submission (verdict: Runtime Error):
x=[int(x) for i in input().split()]
if x[0]==x[1]:
  print("Yes")
else:
  print("No")

Fixed submission:
x=[int(k) for k in input().split()]
if x[0]==x[1]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
[n, r] = map(int, input().rstrip().split(' '))

if n > 10:
    return r
else:
    return r - 100 * (10 - n)


Fixed submission:
[n, r] = map(int, input().rstrip().split(' '))

if n > 10:
    print(r)
else:
    print(r + 100 * (10 - n))
Buggy python submission (verdict: Time Limit Exceeded):
[n, k]= map(int, input().rstrip().split(" "))
ps = list(map(int, input().rstrip().split(" ")))

history = {}

top3 = []

result = 0

def calc_expect_sum(targets):
    return sum( (p+1) * 0.5 for p in targets)


for i in range(n-k+1):
    targets = ps[i:i+k]
    new = calc_expect_sum(targets)
    if new > result:
        result = new

print(result)




Fixed submission:
[n, k]= map(int, input().rstrip().split(" "))
ps = list(map(int, input().rstrip().split(" ")))

history = {}

top3 = []

result = 0

def calc_expect_sum(targets):
    return sum( (p+1) * 0.5 for p in targets)

prev_sum = calc_expect_sum(ps[0:0+k])
result = 0

if n == k:
    print(calc_expect_sum(ps))
else:
    for i in range(1,n-k+1):
        prev = ps[i-1]
        current = ps[i+k-1]
        diff = (current - prev) * 0.5
        new = prev_sum + diff
        if new > result:
            result = new
        prev_sum += diff
    
    print(result)

Buggy python submission (verdict: Time Limit Exceeded):
[n, k]= map(int, input().rstrip().split(" "))
ps = list(map(int, input().rstrip().split(" ")))

history = {}

top3 = []

result = 0

def calc_expect_sum(targets):
    return sum( (p+1) * 0.5 for p in targets)


for i in range(n-k+1):
    targets = ps[i:i+k]
    new = calc_expect_sum(targets)
    if new > result:
        result = new

print(result)




Fixed submission:
[n, k]= map(int, input().rstrip().split(" "))
ps = list(map(int, input().rstrip().split(" ")))

history = {}

top3 = []

result = 0

def calc_expect_sum(targets):
    return sum( (p+1) * 0.5 for p in targets)

prev_sum = calc_expect_sum(ps[0:0+k])
result = 0

if n == k:
    print(calc_expect_sum(ps))
else:
    for i in range(1,n-k+1):
        prev = ps[i-1]
        current = ps[i+k-1]
        diff = (current - prev) * 0.5
        new = prev_sum + diff
        if new > result:
            result = new
        prev_sum += diff
    
    print(result)
Buggy python submission (verdict: Time Limit Exceeded):
s = input().rstrip().split(' ')
h = int(s[0])
n= int(s[1])

A = []
B = []

for i in range(n):
    AB = list(map(int, input().rstrip().split(' ')))
    A.append(AB[0])
    B.append(AB[1])

dp = [[float('inf')] * (h+1)] * (n+1)
dp[0][0] = 0

def min(a, b):
    if a < b:
        return a
    else:
        return b

for i in range(n):
    for j in range(h):
        dp[i+1][j] = dp[i][j]
        dp[i+1][min(j + A[i], h)] = min(dp[i + 1][min(j + A[i], h)], dp[i + 1][j] + B[i])

print(dp[n][h])


Fixed submission:
s = input().rstrip().split(' ')
h = int(s[0])
n= int(s[1])

A = []
B = []

for i in range(n):
    AB = list(map(int, input().rstrip().split(' ')))
    A.append(AB[0])
    B.append(AB[1])

dp = [[float('inf')] * (h+1)] * (n+1)
dp[0][0] = 0

def min(a, b):
    if a < b:
        return a
    else:
        return b

for i in range(n):
    for j in range(h):
        dp[i+1][j] = dp[i][j]
        dp[i+1][min(j + A[i], h)] = min(dp[i + 1][min(j + A[i], h)], dp[i + 1][j] + B[i])

print(dp[n][h])
Buggy python submission (verdict: Time Limit Exceeded):
s = input().rstrip()
N = int(s)

ans = 0
i = 1

while i < N + 1:
    j = int(str(i)[0])
    while j < N + 1:
        if str(i)[-1] == str(j)[0] and str(i)[0] == str(j)[-1]:
            ans = ans + 1
        j = j +  10
    i = i + 1

print(ans)


Fixed submission:
s = input().rstrip()
N = int(s)

ans = 0
i = 1
order = len(str(N))

params = {}

for i in range(1, N + 1):
    Akey = str(i)[-1] + str(i)[0] 
    if params.get(Akey) is not None:
        params[Akey] = params[Akey] + 1
    else:
        params[Akey] = 1

for i in range(1, N + 1):
    Bkey = str(i)[0] + str(i)[-1] 
    count = params.get(Bkey)
    if count is not None:
        ans =  ans + count;

print(ans)

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

ans = 0

for i in range(1, N + 1):
    for j in range(1, N + 1):
        if str(i)[-1] == str(j)[0] and str(i)[0] == str(j)[-1]:
            ans = ans + 1

print(ans)


Fixed submission:
s = input().rstrip()
N = int(s)

ans = 0
i = 1
order = len(str(N))

params = {}

for i in range(1, N + 1):
    Akey = str(i)[-1] + str(i)[0] 
    if params.get(Akey) is not None:
        params[Akey] = params[Akey] + 1
    else:
        params[Akey] = 1

for i in range(1, N + 1):
    Bkey = str(i)[0] + str(i)[-1] 
    count = params.get(Bkey)
    if count is not None:
        ans =  ans + count;

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
from collections import deque
import itertools

[H, W] = map(int, input().rstrip().split(" "))
S = []


for h in range(H):
    Ss = input().rstrip()
    S.append(Ss)

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

max_cost = 0

for h in range(H):
    for w in range(W):
        if S[h][w] == "#":
            continue
        que = deque()
        history = [ [-1 for w in range(W)] for h in range(H)]
        que.append([h, w])
        history[h][w] = 0
        current_max_cost = 0
        while len(que) != 0:
            [x, y] = que.pop()
            for i in range(4):
                newx = x + dx[i]
                newy = y + dy[i]
                if 0 <= newx and newx < H and 0 <= newy and newy < W and S[newx][newy] != "#" and (history[newx][newy] > history[x][y] + 1 or history[newx][newy] == -1):
                    history[newx][newy] = history[x][y] + 1
                    que.append([newx, newy])
        current_max_cost = max(list(itertools.chain.from_iterable(history)))
        if max_cost < current_max_cost:
            max_cost = current_max_cost

print(max_cost)


Fixed submission:
import math
from collections import deque
import itertools

[H, W] = map(int, input().rstrip().split(" "))
S = []


for h in range(H):
    Ss = input().rstrip()
    S.append(Ss)

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

max_cost = 0

for h in range(H):
    for w in range(W):
        if S[h][w] == "#":
            continue
        que = deque()
        history = [ [float('inf') for w in range(W)] for h in range(H)]
        que.append([h, w])
        history[h][w] = 0
        current_max_cost = 0
        while len(que) != 0:
            [x, y] = que.popleft()
            for i in range(4):
                newx = x + dx[i]
                newy = y + dy[i]
                if 0 <= newx and newx < H and 0 <= newy and newy < W and S[newx][newy] != "#" and history[newx][newy] == float('inf'):
                    history[newx][newy] = history[x][y] + 1
                    if current_max_cost < history[newx][newy]:
                        current_max_cost = history[newx][newy]
                    que.append([newx, newy])
        if max_cost < current_max_cost:
            max_cost = current_max_cost

print(max_cost)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
if n <= k:
  print(1)
else:
  c = n // k
  ans = 1
  while (c >= 1):
    ans += 1
    c = c // k
print(ans)
    

Fixed submission:
n, k = map(int, input().split())
if n < k:
  print(1)
else:
  c = n // k
  ans = 1
  while (c >= 1):
    ans += 1
    c = c // k
  print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
if n < k:
  print(1)
else:
  c = n // k
  ans = 1
  while (c >= 1):
    ans += 1
    c = c // k
print(ans)

Fixed submission:
n, k = map(int, input().split())
if n < k:
  print(1)
else:
  c = n // k
  ans = 1
  while (c >= 1):
    ans += 1
    c = c // k
  print(ans)
Buggy python submission (verdict: Runtime Error):
import collections

n = int(input())

s = [",".join(sorted(input())) for i in range(n)]

c = collections.Counter(s)

ans = 0
for i in c.valuses():
  ans += i*(i-1)//2

print(ans)

Fixed submission:
import collections

n = int(input())

s = [",".join(sorted(input())) for i in range(n)]

c = collections.Counter(s)

ans = 0
for i in c.values():
  ans += i*(i-1)//2

print(ans)

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

n = int(input())
S = []
ans =0

for i in range(n):
  s = input()
  s = sorted(s)
  S.append(s)

for i in range(n-1):
  for j in range(i+1,n):
    if S[i] == S[j]:
      ans += 1
print(ans)

Fixed submission:
import collections

n = int(input())

s = [",".join(sorted(input())) for i in range(n)]

c = collections.Counter(s)

ans = 0
for i in c.values():
  ans += i*(i-1)//2

print(ans)
Buggy python submission (verdict: Runtime Error):
n, a, b = map(int input().split())
print(min(a * n, b))

Fixed submission:
n, a, b = map(int, input().split())
print(min(a * n, b))
Buggy python submission (verdict: Time Limit Exceeded):
l, r = map(int, input().split())
a = 2019
for i in range(l, r + 1):
  for j in range(i + 1, r + 1):
    if a > (i * j) % 2019:
      a = (i* j) % 2019
print(a)


Fixed submission:
l, r = map(int, input().split())
if l % 2019 == 0:
  print(0)
else:
  if l // 2019 + 1 <= r // 2019:
    print(0)
  else:
    a = 2019
    for i in range(l, r + 1):
      for j in range(i + 1, r + 1):
        if a > (i * j) % 2019:
          a = (i* j) % 2019
    print(a)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,d = map(int,input().split())
ans = 0
for i in range(a,b+1):
  if i % c != 0:
    if i % d != 0:
      ans += 1
print(ans)

Fixed submission:
import fractions

a,b,c,d = map(int,input().split())
def lcm(x,y):
  return x*y//fractions.gcd(x,y)
def func(n,x,y):
  return n - (n//x + n//y - n//lcm(x,y))
ans = func(b,c,d) - func(a-1,c,d)
print(ans)
Buggy python submission (verdict: Runtime Error):
l=[]
m=[]
n=[]
for i in range(5):
  s=int(input())  
  m.append(round(int(s+5),-1))
  if s%10 != 0:
    l.append(s%10)
print(sum(m)+min(l)-10)

Fixed submission:
l=[]
m=[]
n=[]
a=0
for i in range(5):
  s=int(input())
  n.append(s)
  m.append(round(int(s+5),-1))
  if s%10 != 0:
    l.append(s%10)
    a+=1
if a ==0:
  print(sum(n))
else:
  print(sum(m)+min(l)-10)
Buggy python submission (verdict: Runtime Error):
y,m,d = map(int,input().split(/))
if y<2019 or (y==2019 and m <= 4):
  print("Heisei")
else:
  print("TBD")

Fixed submission:
y, m, d = map(str, input().split("/"))
if int(y) < 2019 or (int(y) == 2019 and int(m) < 5):
  print("Heisei")
else:
  print("TBD")
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,iput().split())
if b + a - c > 0:
	print(b+c)
else:
	print(a+2*b+1)

Fixed submission:
a,b,c = map(int,input().split())
if b + a - c + 1 >= 0:
	print(b+c)
else:
	print(a+2*b+1)

Buggy python submission (verdict: Runtime Error):
a,b,c = int(iput().split())
if b + a - c > 0:
	print(b+c)
else:
	print(a+2*b+1)

Fixed submission:
a,b,c = map(int,input().split())
if b + a - c + 1 >= 0:
	print(b+c)
else:
	print(a+2*b+1)

Buggy python submission (verdict: Runtime Error):
a,b,c = int(iput())
if b + a - c > 0:
	print(b+c)
else:
	print(a+2*b+1)

Fixed submission:
a,b,c = map(int,input().split())
if b + a - c + 1 >= 0:
	print(b+c)
else:
	print(a+2*b+1)
Buggy python submission (verdict: Runtime Error):
x=int(input())
if x == 7 or x == 5 or x == 3:
print('YES')
else:
print('NO')

Fixed submission:
x=int(input())
if x == 7 or x == 5 or x == 3:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
x=int(input())
if x == 7 or x == 5 or x == 3:
print("YES")
else:
print("NO")

Fixed submission:
x=int(input())
if x == 7 or x == 5 or x == 3:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
x=input()
if x == 7 or x == 5 or x == 3:
print("YES")
else:
print("NO")

Fixed submission:
x=int(input())
if x == 7 or x == 5 or x == 3:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
x=input()
if (x == 7) or (x == 5) or (x == 3):
print("YES")
else:
print("NO")

Fixed submission:
x=int(input())
if x == 7 or x == 5 or x == 3:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
x=input()
if x == 7 or 5 or 3:
print("YES")
else:
print("NO")

Fixed submission:
x=int(input())
if x == 7 or x == 5 or x == 3:
	print("YES")
else:
	print("NO")
Buggy python submission (verdict: Runtime Error):
x = 753
s = input()
ans=100
for i in range(len(s)-2):
	if(abs(x-int(s[i:i+3]))<ans):
		ans=abs(x-int(s[i:i+3))
print(ans)

Fixed submission:
x = 753
s = input()
ans=10**10
for i in range(len(s)-2):
	if(abs(x-int(s[i:i+3]))<ans):
		ans=abs(x-int(s[i:i+3]))
print(ans)

Buggy python submission (verdict: Runtime Error):
x = 753
s = int(input())
ans=10**10
for i in range(len(s)-2):
	if(abs(x-int(s[i:i+3]))<ans):
		ans=abs(x-int(s[i:i+3))
print(ans)

Fixed submission:
x = 753
s = input()
ans=10**10
for i in range(len(s)-2):
	if(abs(x-int(s[i:i+3]))<ans):
		ans=abs(x-int(s[i:i+3]))
print(ans)

Buggy python submission (verdict: Runtime Error):
x = 753
s = int(input())
ans=100
for i in range(len(s)-2):
	if(abs(x-int(s[i:i+3]))<ans):
		ans=abs(x-int(s[i:i+3))
print(ans)

Fixed submission:
x = 753
s = input()
ans=10**10
for i in range(len(s)-2):
	if(abs(x-int(s[i:i+3]))<ans):
		ans=abs(x-int(s[i:i+3]))
print(ans)
Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
L=set()
for i in range(len(K)):
    for j in range(len(S)-i):
        L.add((S[j:j+i+1]))
L = sorted(list(L))
print(L[K-1])

Fixed submission:
S = input()
K = int(input())
L=set()
for i in range(K):
    for j in range(len(S)-i):
        L.add((S[j:j+i+1]))
L = sorted(list(L))
print(L[K-1])

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
K = int(input())
L=set()
for i in range(len(S)):
    for j in range(len(S)-i):
        L.add((S[j:j+i+1]))
L = sorted(list(L))
print(L[K-1])


Fixed submission:
S = input()
K = int(input())
L=set()
for i in range(K):
    for j in range(len(S)-i):
        L.add((S[j:j+i+1]))
L = sorted(list(L))
print(L[K-1])
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,x,y = map(int,input().split())
m=[]
for i in range(x+1):
  for j in range(y+1):
    if x-i == y-j:
      m.append(a*i + b*j + 2*c*(x-i))
print(min(m))

Fixed submission:
a,b,c,x,y = map(int,input().split())
m=[]
for i in range(10**5+1):
  m.append(2*c*i + a*max(0,x-i) + b*max(0,y-i))
print(min(m))
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y < t or (x + y + t) % 2:
        print("No")
        exit()
print("Yes")

Fixed submission:
a, b = map(int,input().split())
if a * b % 2== 0:
	print("Even")
else:
	print("Odd")
Buggy python submission (verdict: Runtime Error):
a,b = map(str,input().split())
ab= int(a+b)
if int(squrt(ab))**2 == ab:
  print("Yes")
else:
  print("No")

Fixed submission:
from math import sqrt
a,b = map(str,input().split())
ab= int(a+b)
if int(sqrt(ab))**2 == ab:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
a,b = map(str,input().split())
ab= int(a+b)
if int(squrt(ab))**2 == ab:
  print("Yes")
else:
  print("No")

Fixed submission:
from math import sqrt
a,b = map(str,input().split())
ab= int(a+b)
if int(sqrt(ab))**2 == ab:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())
if (0 =< x < y) or (x < y =< 0):
  print(y - x)
elif (0 < y < x) or (y < x < 0):
  ans = 2 + abs(x - y)
  print(ans)
else:
  ans = 1 + abs(abs(x) - abs(y))
  print(ans)

Fixed submission:
x, y = map(int, input().split())
if (0 <= x  < y) or (x < y <= 0):
  print(y - x)
elif (0 < y < x) or (y < x < 0):
  ans = 2 + abs(x - y)
  print(ans)
else:
  ans = 1 + abs(abs(x) - abs(y))
  print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(min(a%*b*c,b%*a*c,c%*a*b))

Fixed submission:
A, B, C = map(int, input().split())
print(min(C%2*A*B, A%2*B*C, B%2*C*A))

Buggy python submission (verdict: Runtime Error):

a,b,c=map(int,input().split())
print(min((a%)*b*c,a*(b%)*c,a*b*(c%)))

Fixed submission:
A, B, C = map(int, input().split())
print(min(C%2*A*B, A%2*B*C, B%2*C*A))

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print(min(a%*b*c,a*b%*c,a*b*c%))

Fixed submission:
A, B, C = map(int, input().split())
print(min(C%2*A*B, A%2*B*C, B%2*C*A))
Buggy python submission (verdict: Runtime Error):
S = input()
s = set(S)
if ("N" in s and "S" not in s) 
 or ("S" in s and "N" not in s)
 or ("W" in s and "E" not in s)
 or ("E" in s and "W" not in s):
    print("No")
else:
    print("Yes")

Fixed submission:
S = input()
s = set(S)
if ("N" in s and "S" not in s) \
 or ("S" in s and "N" not in s) \
 or ("W" in s and "E" not in s) \
 or ("E" in s and "W" not in s):
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
S=input()
s=set(S)
if ("N" in s and "S" not in s) or
("S" in s and "N" not in s) or
("E" in s and "W" not in s) or
("W" in s and "E" not in s):
  print("No")
else:
  print("Yes")

Fixed submission:
S = input()
s = set(S)
if ("N" in s and "S" not in s) \
 or ("S" in s and "N" not in s) \
 or ("W" in s and "E" not in s) \
 or ("E" in s and "W" not in s):
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
S=input()
s=set(S)
if ("N" in s and "S" not in s) or
	("S" in s and "N" not in s) or
	("E" in s and "W" not in s) or
    ("W" in s and "E" not in s):
      print("No")
else:
  print("Yes")

Fixed submission:
S = input()
s = set(S)
if ("N" in s and "S" not in s) \
 or ("S" in s and "N" not in s) \
 or ("W" in s and "E" not in s) \
 or ("E" in s and "W" not in s):
    print("No")
else:
    print("Yes")

Buggy python submission (verdict: Runtime Error):
s=input()
if ("N" in s and "S" not in s) or
	("S" in s and "N" not in s) or
	("E" in s and "W" not in s) or
    ("W" in s and "E" not in s):
      print("No")
else:
  print("Yes")

Fixed submission:
S = input()
s = set(S)
if ("N" in s and "S" not in s) \
 or ("S" in s and "N" not in s) \
 or ("W" in s and "E" not in s) \
 or ("E" in s and "W" not in s):
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
a,b=map(int,input().split())
l=range(a,b+1)
ans=1
for i in range(len(l)):
  ans=ans*l[i]
if ans>0:
  print("Positive")
elif ans<0:
  print("Negative")
else:
  print("Zero")

Fixed submission:
a,b=map(int,input().split())
if (a>0 and b>0):
	print("Positive")
elif (a>=0 and b<=0) or (a<=0 and b>=0):
	print("Zero")
elif (a<0 and b<0 and (a+b)%2==0):
	print("Negative")
else:
	print("Positive")

Buggy python submission (verdict: Time Limit Exceeded):
a,b=map(int,input().split())
l=range(a,b+1)
ans=1
for i in range(len(l)):
  ans=ans*l[i]
if ans>0:
  print("Positive")
if ans<0:
  print("Negative")
if ans==0:
  print("Zero")

Fixed submission:
a,b=map(int,input().split())
if (a>0 and b>0):
	print("Positive")
elif (a>=0 and b<=0) or (a<=0 and b>=0):
	print("Zero")
elif (a<0 and b<0 and (a+b)%2==0):
	print("Negative")
else:
	print("Positive")

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
l=range(a,b+1)
ans=1
for i in rang(len(l)):
  ans=ans*l[i]
print(ans)

Fixed submission:
a,b=map(int,input().split())
if (a>0 and b>0):
	print("Positive")
elif (a>=0 and b<=0) or (a<=0 and b>=0):
	print("Zero")
elif (a<0 and b<0 and (a+b)%2==0):
	print("Negative")
else:
	print("Positive")
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[1::2])

Fixed submission:
n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[1::2]))

Buggy python submission (verdict: Runtime Error):
n=int(input())
l=sorted(list(map(int,iput().split())),reverse=True)
print(sum(l[1::2])

Fixed submission:
n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[1::2]))

Buggy python submission (verdict: Runtime Error):
n=int(input())
l=sorted(list(map(int,iput().split()),reverse=True)
print(sum(l[1::2])

Fixed submission:
n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
print(sum(l[1::2]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
r = int(input())
if n < 10:
  print(r + 100 * (10 - n))
else:
  print(r)

Fixed submission:
str = input().split(" ")
n = int(str[0])
r = int(str[1])
if n < 10:
  print(r + 100 * (10 - n))
else:
  print(r)