Harryxun/stf_run huggingface dataset:
N = int(input())
K = int(input())
x = list(map(int,input().split()))
ans = 0
for i in range(N):
    ans += min(x[i],K-x[i])*2
print(ans)


### FIXED CODE ###

N = int(input())
A = int(input())
print(N**2 - A)
import sys
input=sys.stdin.readline
import math

A,B = (int(x) for x in input().rstrip('\n').split())
c = math.gcd(A,B)
if c==1:
  print(1)
else:
  res = 1
  d = math.floor(math.sqrt(c))
  for i in range(2,d+2):
    if c%i==0:
      res += 1
      while c%i==0:
        c = c//i
  if res == 1:
    res += 1
print(res)

### FIXED CODE ###

import sys
input=sys.stdin.readline
import math

A,B = (int(x) for x in input().rstrip('\n').split())
c = math.gcd(A,B)
if c==1:
  print(1)
else:
  ps=[]
  d = math.floor(math.sqrt(c))
  for i in range(2,d+2):
    if c%i==0:
      if all(i%x!=0 for x in ps):
        ps.append(i)
        while c % i ==0:
          c = c//i
  if c > 1:
    ps.append(0)
  print(len(ps)+1)
n, k = map(int, input().split())
if n // k % 0:
    print("0")
else:
    print("1")

### FIXED CODE ###

n, k = map(int, input().split())
if n % k == 0:
    print("0")
else:
    print("1")
K = int(input())
sunuke = [1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,99,199,299,399,499,599,699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999,19999,29999,39999,49999,59999,69999,79999,89999,99999,199999,299999,399999,499999,599999,699999,799999,899999,999999]
i = 0
while i < K:
  print(sunuke[i])
  i+=1

### FIXED CODE ###

#D問題
K=int(input())
keta=1
now=1
count=0

def sunuke(n):
    a=0
    for i in str(n):
        a+=int(i)
    return(n/a)

while count < K:
    if sunuke(now) <= sunuke(now+keta):
        print(now)
        now+=keta
        count+=1
    else:
        now+=9*keta
        keta*=10
import functools
import math

n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n):
  l=a
  del l[i]
  ans=max(ans,functools.reduce(math.gcd, l))
print(ans)


### FIXED CODE ###

import fractions
n=int(input())
a=list(map(int,input().split()))
l=[a[0]]
r=[a[-1]]
for i in range(n-1):
  l.append(fractions.gcd(l[i],a[i+1])) #l[i] は最初i個
for i in range(n-1):
  r.append(fractions.gcd(r[i],a[-2-i])) #r[i]は右i r[n-1]=全部 l[0]and r[n-3]
m=[l[n-2],r[n-2]]
for i in range(n-2):
  m.append(fractions.gcd(l[i],r[n-i-3]))
print(max(m))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 15 16:58:00 2019

@author: YudNK
"""
import bisect as bs

N, Q = map(int, input().split())
E = []
for i in range(N):
    s, t, x = map(int, input().split())
    a = [s - x, t - x, x] #イベント
    E.append(a)
E.sort(key = lambda x: x[2])
D = []
for i in range(Q):
    D.append(int(input()))

ans = [-1]*Q
check = [-1]*Q

for e in E:
    l = bs.bisect_left(D, e[0])
    r = bs.bisect_left(D, e[1])
    while l != r:
        if check[l] == -1:  
            ans[l] = e[2]
            check[l] = r
            l += 1
        else:
            l = check[l]
        
[print(i) for i in ans]

### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 15 16:58:00 2019

@author: YudNK
"""
import bisect as bs

N, Q = map(int, input().split())
E = []
for i in range(N):
    s, t, x = map(int, input().split())
    a = [s - x, t - x, x] #イベント
    E.append(a)
E.sort(key = lambda x: x[2])
D = []
for i in range(Q):
    D.append(int(input()))

ans = [-1]*Q
check = [-1]*Q

for e in E:
    l = bs.bisect_left(D, e[0])
    r = bs.bisect_left(D, e[1])
    while l < r:
        if check[l] == -1:  
            ans[l] = e[2]
            check[l] = r
            l += 1
        else:
            l = check[l]
        
[print(i) for i in ans]
N,K = map(int,input().split())
def dfs(cur):
    if cur == 0:
        return 'p'
    l_1 = dfs(cur-1)
    barger = 'b' + l_1 + 'p' + l_1 + 'b'
    return barger
ans = dfs(N)[:K].count('p')
print(ans)

### FIXED CODE ###

N,K = map(int,input().split())
import sys
sys.setrecursionlimit(10000000)

a, p = [1], [1]
for i in range(N):
    a.append(a[i] * 2 + 3)
    p.append(p[i] * 2 + 1)
def dfs(N,X):
    #print(N,X)
    if N == 0:
        return 0 if X != 1 else 1
    elif X <= 1 + a[N-1]:
        return dfs(N-1, X-1)
    elif X == 2 + a[N-1]:
        return p[N-1] + 1
    elif X <= 2 + 2*a[N-1]:
        return p[N-1] + 1 + dfs(N-1, X-2-a[N-1])
    else:
        return 2*p[N-1]+1
    
print(dfs(N,K))
mport math

eight, ten = map(int, input().split())

eight_price = eight / 0.08
ten_price = ten / 0.1

if eight_price >= ten_price:
    bigger = eight_price
    if (bigger // 10) != ten:
        print("-1")
    else:
        print(math.ceil(bigger))
else:
    bigger = ten_price
    if (bigger * 8 // 100) != eight:
        print("-1")
    else:
        print(math.ceil(bigger))

### FIXED CODE ###

import math

eight, ten = map(int, input().split())

eight_price = eight / 0.08
ten_price = ten / 0.1

if eight_price >= ten_price:
    bigger = eight_price
    if (bigger // 10) != ten:
        print("-1")
    else:
        print(math.ceil(bigger))
else:
    bigger = ten_price
    if (bigger * 8 // 100) != eight:
        print("-1")
    else:
        print(math.ceil(bigger))
def fib(n):
    if n == 0: 
        return 0

    if n == 1: 
        return 1

    def matmul(M1, M2):
        a11 = M1[0][0]*M2[0][0] + M1[0][1]*M2[1][0]
        a12 = M1[0][0]*M2[0][1] + M1[0][1]*M2[1][1]
        a21 = M1[1][0]*M2[0][0] + M1[1][1]*M2[1][0]
        a22 = M1[1][0]*M2[0][1] + M1[1][1]*M2[1][1]
        return [[a11, a12], [a21, a22]]

    def matPower(mat, p):
        if p == 1: 
            return mat

        m2 = matPower(mat, p//2)
        if p % 2 == 0:
            return matmul(m2, m2)
        else: 
            return matmul(matmul(m2, m2),mat)

    Q = [[1,1],[1,0]]

    q_final = matPower(Q, n-1)
    return q_final[0][0]

N, M = map(int, input().split())
V = []
for x in range(M):
    V.append(int(input()))

result = 1

for i in range(1, M):
    if(V[i]-V[i-1]==1):
        result = 0

result *= fib(V[0])

for x in range(1, M):
    result *= fib(V[x]-V[x-1]-1)

if(V[M-1]!=N):
    result *= fib(N-V[M-1])

print(result%1000000007)

### FIXED CODE ###

def fib(n):
    if n == 0: 
        return 0

    if n == 1: 
        return 1

    def matmul(M1, M2):
        a11 = M1[0][0]*M2[0][0] + M1[0][1]*M2[1][0]
        a12 = M1[0][0]*M2[0][1] + M1[0][1]*M2[1][1]
        a21 = M1[1][0]*M2[0][0] + M1[1][1]*M2[1][0]
        a22 = M1[1][0]*M2[0][1] + M1[1][1]*M2[1][1]
        return [[a11, a12], [a21, a22]]

    def matPower(mat, p):
        if p == 1: 
            return mat

        m2 = matPower(mat, p//2)
        if p % 2 == 0:
            return matmul(m2, m2)
        else: 
            return matmul(matmul(m2, m2),mat)

    Q = [[1,1],[1,0]]

    q_final = matPower(Q, n-1)
    return q_final[0][0]

N, M = map(int, input().split())
if(M==0):
    print(fib(N+1)%1000000007)
else:
    V = []
    for x in range(M):
        V.append(int(input()))

    result = 1

    for i in range(1, M):
        if(V[i]-V[i-1]==1):
            result = 0

    result *= fib(V[0])

    for x in range(1, M):
        result *= fib(V[x]-V[x-1]-1)

    if(V[M-1]!=N):
        result *= fib(N-V[M-1])

    print(result%1000000007)
a,b,c=map(int,input().split())
if a<b && b<c:
 print('Yes')
else:
 print('No')

### FIXED CODE ###

a,b,c=map(int,input().split())
if a<b<c:
 print('Yes')
else:
 print('No')
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0221

"""
import sys
from sys import stdin
from collections import deque
input = stdin.readline


def fb_gen(count=1):
    while True:
        if count % 15 == 0:
            ans = 'FizzBuzz'
        elif count % 5 == 0:
            ans = 'Buzz'
        elif count % 3 == 0:
            ans = 'Fizz'
        else:
            ans = str(count)
        yield ans
        count += 1


def main(args):
    while True:
        m, n = map(int, input().split())
        if m == 0 and n == 0:
            break
        players = deque(range(1, m+1))
        fb = fb_gen()
        for _ in range(n):
            if len(players) == 1:
                break
            p = input().strip()
            if p != fb.__next__():
                players.popleft()
            else:
                players.rotate(-1)

        result = list(players)
        result.sort()
        print(*result)


if __name__ == '__main__':
    main(sys.argv[1:])

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0221

"""
import sys
from sys import stdin
from collections import deque
input = stdin.readline


def fb_gen(count=1):
    while True:
        if count % 15 == 0:
            ans = 'FizzBuzz'
        elif count % 5 == 0:
            ans = 'Buzz'
        elif count % 3 == 0:
            ans = 'Fizz'
        else:
            ans = str(count)
        yield ans
        count += 1


def main(args):
    while True:
        m, n = map(int, input().split())
        if m == 0 and n == 0:
            break
        players = deque(range(1, m+1))
        fb = fb_gen()
        ok_count = 0
        for _ in range(n):
            p = input().strip()
            if p != fb.__next__():
                if len(players) > 1:
                    players.rotate(ok_count)
                    players.popleft()
                    ok_count = 0
            else:
                ok_count -= 1

        result = list(players)
        result.sort()
        print(*result)


if __name__ == '__main__':
    main(sys.argv[1:])
n,k=map(int,input().split())
print(k*((k-1)**(n-1))

### FIXED CODE ###

n,k=map(int,input().split())
print(k*((k-1)**(n-1)))
S, T = input().split()
A, B = (int(x) for x in input().split())
U = input()
print(A - int(S==U), B - int(T==U) if S == U or T == U)
  

### FIXED CODE ###

S, T = input().split()
A, B = (int(x) for x in input().split())
U = input()
if S == U or T == U:
  print(A - int(S==U), B - int(T==U))
_=input()
S=input()
L=[]
r=1
for i in range(len(S)):
    if S[i] in L:
        r=int(r*(3/2))
    else:
        r*=2
        L.append(S[i])

print((r-1)%(10**9+7))


### FIXED CODE ###

N=int(input())
S=input()
R=""
L=[]
obj={}
for s in S:
    if s not in L:
        R+=s
        L.append(s)
        obj[s]=1
    else:
        obj[s]+=1

out=1
for a in obj.keys():
    out*=(obj[a]+1)
    if out>10**9+7:
        out=out%(10**9+7)
print(out-1)
import heapq

def binary_search(data, value):
    left = 0            # 探索する範囲の左端を設定
    right = len(data) - 1            # 探索する範囲の右端を設定
    while left <= right:
        mid = (left + right) // 2            # 探索する範囲の中央を計算
        if data[mid] == value:
            # 中央の値と一致した場合は位置を返す
            return mid
        elif data[mid] < value:
            # 中央の値より大きい場合は探索範囲の左を変える
            left = mid + 1
        else:
            # 中央の値より小さい場合は探索範囲の右を変える
            right = mid - 1
    return -1            # 見つからなかった場合

n, k = map(int, input().split())
a = list(map(lambda x: int(x) - 1, input().split()))
way = [0]
hq = [0]
heapq.heapify(hq)
posi = 0
cycle = 0
while True:
    if not(a[posi] in way):
        rest = way.index(a[posi])
        cycle -= (rest - 1)
        break
    way.append(a[posi])
    heapq.heappush(hq, a[posi])
    posi = a[posi]
    cycle += 1
# print(way)
# print(cycle)
if k < len(way):
    print(way[k] + 1)
else:
    print(way[(k-rest) % cycle + rest] + 1)

### FIXED CODE ###

s = input()
t = input()
if t[:-1] == s:
    print("Yes")
else:
    print("No")
import math
A,B=map(int,input().split())
x=(A*B)/(math.gcd(A,B))

print(str(x))


### FIXED CODE ###

from fractions import gcd
A,B=map(int,input().split())
x=(A*B)//(gcd(A,B))

print(x)
s = int(input())
ptn = []
count = 0
while True:
  ptn.append(s)
  if s%2 == 0:
    s /=2
  else:
    s = 3*x+1
  if s in ptn:
    print(count+1)
    break
  count +=1


### FIXED CODE ###

s = int(input())
ptn = []
count = 1
while True:
  ptn.append(s)
  if s%2 == 0:
    s /=2
  else:
    s = 3*s+1
  if s in ptn:
    print(count+1)
    exit()
  count +=1
n, m = map(int, input().split())
lst = list(map(int, input().split()))
lst = sorted(lst, key = lambda x:-x)
dic = {1:2, 2:5, 3:5, 4:4, 5:5, 6:6, 7:3, 8:7, 9:6}

s = set()
for i in lst:
    s.add(dic[i])
s = list(sorted(s))

dp = [0] * (n+1)
for i in range(0, n+1):
    a = 0
    max_a = 0
    for j in s:
        if i-j < 0:
            pass
        elif i == j:
            a = 1
        elif i - j > 0 and dp[i-j] > 0:
            a = dp[i-j] + 1
        if max_a < a:
            max_a = a
    dp[i] = max_a

def out(dp, dic, n, ans, ans_digit, lst):
    if len(ans) == ans_digit-1:
        for i in lst:
            if n == dic[i]:
                return ans + str(i)
    else:
        for i in lst:
            if n - dic[i] >= 0:
                if dp[n] -1 == dp[n-dic[i]]:
                    ans += str(i)
                    next_n = n - dic[i]
                    break
        return out(dp, dic, next_n, ans, ans_digit, lst)
    
print(out(dp, dic, n, '', dp[n], lst))

### FIXED CODE ###

n, m = map(int, input().split())
lst = list(map(int, input().split()))
lst = sorted(lst, key = lambda x:-x)
dic = {1:2, 2:5, 3:5, 4:4, 5:5, 6:6, 7:3, 8:7, 9:6}

s = set()
for i in lst:
    s.add(dic[i])
s = list(sorted(s))

dp = [0] * (n+1)
for i in range(0, n+1):
    a = 0
    max_a = 0
    for j in s:
        if i-j < 0:
            pass
        elif i == j:
            a = 1
        elif i - j > 0 and dp[i-j] > 0:
            a = dp[i-j] + 1
        if max_a < a:
            max_a = a
    dp[i] = max_a

ans = ''
ans_digit = dp[n]
while len(ans) < ans_digit:
    if len(ans) == ans_digit-1:
        for i in lst:
            if n == dic[i]:
                ans += str(i)
                break
    else:
        for i in lst:
            if n - dic[i] >= 0:
                if dp[n] -1 == dp[n-dic[i]]:
                    ans += str(i)
                    n -= dic[i]
                    break
    
print(ans)
N, K = map(int, input().split())
A = list(map(int, input().split()))

A_neg = []
A_pos = []

for i in range(N):
  if A[i] <= 0:
    A_neg.append(-A[i])
  else:
    A_pos.append(A[i])

A_neg.sort(reverse=True)
A_pos.sort(reverse=True)

ans = 1

if K%2==1 and len(A_pos)==0:
  for i in range(1, K+1):
    ans *= (A_neg[-i]%1000000007)
    ans %= 1000000007
  print(-ans)

else:
  if K%2==1:
    ans *= A_pos.pop(0)
    K -= 1
  buf = []
  for i in range(len(A_pos)//2):
    buf.append(A_pos[2*i]*A_pos[2*i+1])
  for i in range(len(A_neg)//2):
    buf.append(A_neg[2*i]*A_neg[2*i+1])
  buf.sort(reverse=True)
  for i in range(K//2):
    ans *= (buf[i]%1000000007)
    ans %= 1000000007
  print(ans)
  



### FIXED CODE ###

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

A_neg = []
A_pos = []

for i in range(N):
  if A[i] <= 0:
    A_neg.append(-A[i])
  else:
    A_pos.append(A[i])

A_neg.sort(reverse=True)
A_pos.sort(reverse=True)

ans = 1

if K == N:
  for i in range(N):
    ans *= (A[i]%1000000007)
    ans %= 1000000007
  print(ans)

elif K%2==1 and len(A_pos)==0:
  for i in range(1, K+1):
    ans *= ((-A_neg[-i])%1000000007)
    ans %= 1000000007
  print(ans)

else:
  if K%2==1:
    ans *= A_pos.pop(0)
    K -= 1
  buf = []
  for i in range(len(A_pos)//2):
    buf.append(A_pos[2*i]*A_pos[2*i+1])
  for i in range(len(A_neg)//2):
    buf.append(A_neg[2*i]*A_neg[2*i+1])
  buf.sort(reverse=True)
  for i in range(K//2):
    ans *= (buf[i]%1000000007)
    ans %= 1000000007
  print(ans)
K = int(input())
S = input()
l = len(S)
if l > K:
    print("{}...".format(S[:K]))
else:
    print(S)

### FIXED CODE ###

N = input()
x = N[-1]

if x == '3':
    print("bon")
elif x == '0' or x == '1' or x == '6' or x == '8':
    print('pon')
else:
    print('hon')
#input_str = input()
input_str = '8 8 1'
A, B, C = input_str.split()
A = int(A)
B = int(B)
C = int(C)

if A + B > C + 1:
    print(C*2+1)
else
	print((A+B)*2+1

### FIXED CODE ###

input_str = input()

a, b, c = input_str.split()
a = int(a)
b = int(b)
c = int(c)

if a + b >= c:
    print(b + c)
else:
    print((a+b)*2 +1 - a)
while 1:
    list1=input().split('"')
    if list1[0]==".":
        break
    list2=input().split('"')
     
    c1=0
    c2=0
    flag=0
     
    if len(list1)!=len(list2):
        print("DIFFERENT")
    else:
        i=0
        while i<len(list1):
            if list1[i]==list2[i]:
                c1+=1
            elif i%2==0:
                print("DIFFERENT")
                flag=1
                break
            else:
                c2+=1
                if c2>1:
                    print("DIFFERENT")
                    break
            i+=1
                 
        if flag==0 and t2==1:
            print("CLOSE")
        if c1==len(list1):
            print("IDENTICAL")


### FIXED CODE ###

while True:
    list1=input().split('"')
    if list1[0]==".":
        break
    list2=input().split('"')
     
    cnt1=0
    cnt2=0
    flag=0
     
    if len(list1)!=len(list2):
        print("DIFFERENT")
    else:
        i=0
        while i<len(list1):
            if list1[i]==list2[i]:
                cnt1+=1
            elif i%2==0:	#[ " ~~~~~ " ]in ""
                print("DIFFERENT")
                flag=1
                break
            else:
                cnt2+=1
                if cnt2>1:
                    print("DIFFERENT")
                    break
            i+=1
                 
        if flag==0 and cnt2==1:
            print("CLOSE")
        if cnt1==len(list1):
            print("IDENTICAL")
k,x=map(int,input().split())

mini = x-k+1
maxi = k+x-1

lis = []
for i in range(mini,max+1):
  lis.append(i)

print(*lis)

### FIXED CODE ###

k,x=map(int,input().split())
 
mini = x-k+1
maxi = k+x-1
 
lis = []
for i in range(mini,maxi+1):
  lis.append(i)
 
print(*lis)
a,b,c = map(int,input().split())

if any((a%2==1,b%2!==1,c%2==1)):
    print(0)
    exit()
    
cnt = 0
while cnt <= 100:
    a,b,c = (b+c)/2, (a+c)/2,(a+b)/2
    cnt += 1
    if any((a%1!=0,b%1!=0,c%1!=0)):
        print(cnt-1)
        exit()
print(-1)

### FIXED CODE ###

a,b,c = map(int,input().split())

if any((a%2==1,b%2==1,c%2==1)):
    print(0)
    exit()
    
cnt = 0
while cnt <= 100:
    a,b,c = (b+c)/2, (a+c)/2,(a+b)/2
    cnt += 1
    if any((a%1!=0,b%1!=0,c%1!=0)):
        print(cnt-1)
        exit()
print(-1)
N=int(input())
if(N<105):
  print(0)
elif(105<=N<135):
  print("1")
elif(135<=N<165):
  print("2")
elif(165<=N<189):
  print("3")
elif(189<=N<195):
  print("4")
else:
  print("5")

### FIXED CODE ###

A,B=map(int,input().split())
print((A-1)*(B-1))
O = input()
E = input()
a = str()
for i in range(len(O)):
    a += O[i] + E[i]
print(a)

### FIXED CODE ###

O = input()
E = input()
a = str()
if len(O)==len(E):
    for i in range(len(O)):
        a += O[i] + E[i]
else :
    for i in range(len(O)-1):
        a += O[i] + E[i]
    a += O[-1]
print(a)
x = str(input())
n = len(x)
stack = []
for i in range(n):
    if x[i] == 'S':
        stack.append('S')
    elif x[i] == 'T' and (len(stack) == 0 or stack[len(stack) - 1]) == 'T':
        stack.append('T')
    elif x[i] == 'T' and stack[len(stack) - 1] == 'S':
        stack.pop()
print(len(stack))


### FIXED CODE ###

x = str(input())
n = len(x)
stack = []
for i in range(n):
    if x[i] == 'S':
        stack.append('S')
    elif len(stack) == 0 or stack[len(stack) - 1] == 'T':
        stack.append('T')
    else:
        stack.pop()
print(len(stack))
def main2():
    w = input()
    judge = "Yes"
    for i in w:
        if w.count(i) % 2 != 0:
            judge = false
    print(judge)

main2()

### FIXED CODE ###

def main2():
    w = input()
    judge = "Yes"
    for i in w:
        if w.count(i) % 2 != 0:
            judge = "No"
    print(judge)

main2()
import sys

Num = int(sys.stdin.readline().rstrip())
Num_str = str(Num)
list_stu_Num = list(sys.stdin.readline().rstrip().split())
list_stu_Num_int = [int(s) for s in list_stu_Num]
list_attend_stu = None
for i in range(1, Num + 1):
    for l in range(0, Num):
        if list_stu_Num_int[l] == i:
            if not list_attend_stu:
                list_attend_stu = list(str(l + 1))
            else:
                list_attend_stu.append(l + 1)
print(*list_attend_stu)


### FIXED CODE ###

import sys

a = sys.stdin.readline().rstrip()
a_int = int(a)

if a_int%2==0:
    print("0.5")
elif a_int == 1:
    print("1.0000000000")
else:
    b = ((a_int - 1)/2 + 1) / a_int
    print('{:.10f}'.format(b))
n,k=map(int,input().split())
while n>=0:
  n=abs(n-k)
  if n-k<=0:
    print(abs(n-k)
    break

### FIXED CODE ###

n,k=map(int,input().split())
print(min(n%k,abs(n%k-k)))
N, Q=map(int, input().split())
ab=[list(map(int, input().split())) for _ in range(N-1)]
px=[list(map(int, input().split())) for _ in range(Q)]
to=[[] for _ in range(N)]
co=[0 for _ in range(N)]

for a, b in ab:
    a-=1
    b-=1
    to[a].append(b)
    to[b].append(a)
for p, x in px:
    p-=1
    co[p]+=x

def dfs(v, p=-1):
    for u in to[v]:
        if p==u:
            continue
        co[u]+=co[v]
        dfs(u, v)

dfs(0)
print(co)

### FIXED CODE ###

N,Q=map(int, input().split())
node_lst=[list(map(int, input().split())) for i in range(N-1)]
ope_lst=[list(map(int, input().split())) for i in range(Q)]
cnt_lst=[0 for i in range(N)]
for ope in ope_lst:
    p, x = ope[0], ope[1]
    cnt_lst[p-1]+=x
node_lst=sorted(node_lst, key=lambda x:x[0])
for l in node_lst:
    src, dst = l[0]-1, l[1]-1
    cnt_lst[dst]+=cnt_lst[src]
print(" ".join([str(c) for c in cnt_lst]))
S = int(input())
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

S = input()
if S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
if sort.(input()) =="abc":
  print("yes")

### FIXED CODE ###

S=input()
S=set(S)
if len(S)==3:
  print("Yes")
else:
  print("No")
s = input()
  res = 0
  for i in range(len(s)//2):
    if s[i] != s[-(i+1)]:
      res += 1
  print(res)

### FIXED CODE ###

s = input()
res = 0
for i in range(len(s)//2):
  if s[i] != s[-(i+1)]:
    res += 1
print(res)
import functools
import operator

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

i = 2
res = []
if N == 1:
  print(P)
elif P == 1:
  print(1)
else:
  while i <= P**0.5:
    while P % i**N == 0:
      P /= i**N
      res.append(i)
    else:
      if i == 2:
        i += 1
      else:
        i += 2
    
    
result = functools.reduce(operator.mul, res)
print(result)

### FIXED CODE ###

N,P = map(int,input().split())
i = round(P**(1/N))
res = []
if N == 1:
  print(P)
elif P == 1:
  print(1)
else:
  for i in range(i,0,-1):
    if P%i**N==0:
      print(i)
      break
n=int(input())
x=list(map(int,input().split()))

answers=[]
for i in range(min(x),max(x)):
    sum=0
    for j in range(n):
        sum+=(x[j]-i)**2
    answers.append(sum)

print(min(answers))


### FIXED CODE ###

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

answers=[]
for i in range(min(x)-1,max(x)+1):
    sum=0
    for j in range(n):
        sum+=(x[j]-i)**2
    answers.append(sum)

print(min(answers))
H,W= map(int,input().split())
mine = [list(input()) for i in range(H)]

def count(ch):
  return 1 if ch == '#' else 0

for i in range(H):
  for j in range(W):
    num = 0
    if mine[i][j] == '#':
      continue
    else:
      for k in range(-1,2):
        for l in range(-1,2):
          num += (1 if mine[i+k][j+l]=='#' else 0) 
      
for i in range(1,H+1):
  for j in range(1,W+1):
    print(mine[i][j],end='')
  print()



### FIXED CODE ###

H,W= map(int,input().split())
emp_H= [['.']*(W+2)]
mine = [['.']+list(input())+ ['.'] for i in range(H)]
mine = emp_H + mine + emp_H

def count(ch):
  return 1 if ch == '#' else 0

for i in range(1,H+1):
  for j in range(1,W+1):
    if mine[i][j] == '#':
      continue
    else:
      mine[i][j] = count(mine[i-1][j-1])+count(mine[i][j-1])+count(mine[i+1][j-1])+count(mine[i-1][j])+count(mine[i][j])+count(mine[i+1][j])+count(mine[i-1][j+1])+count(mine[i][j+1])+count(mine[i+1][j+1])
for i in range(1,H+1):
  for j in range(1,W+1):
    print(mine[i][j],end='')
  print()
N = int(input())
A = list(map(int,input().split()))
i = 0
for i <= N-1:
  B[i] = 1/A[i]
S = sum(B)
answer = 1 / S
print(answer)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
i = 0
B = 0
while i <= N-1:
  B += 1/A[i]
  i = i + 1
answer = 1 / B
print(answer)