Harryxun/stf_run huggingface dataset:
import math
 
MOD = 1000000000 + 7
 
def egcd(a, b):
    if a ==  0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b%a, a)
        return (g, x - (b//a) * y, y)
 
def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception("No inverse exists")
    else:
        return x % m
 
def combination(n, r):
    return math.factorial(n)%MOD * modinv(math.factorial(r), MOD) * modinv(math.factorial(n-r), MOD) % MOD
    # return math.factorial(n) // math.factorial(r) // math.factorial(n-r)
 
N, K = [int(x) for x in input().split()]
 
for i in range(1, K+1):
    ans = (combination(N-K+1, i) * math.factorial((K-i)+(i-1)))%MOD // (math.factorial(K-i)%MOD) // (math.factorial(i-1)%MOD)
 
    print(ans%MOD)


### FIXED CODE ###

import math
 
MOD = 1000000000 + 7
 
def egcd(a, b):
    if a ==  0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b%a, a)
        return (g, x - (b//a) * y, y)
 
def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception("No inverse exists")
    else:
        return x % m
 
def combination(n, r):
    return math.factorial(n)%MOD * modinv(math.factorial(r), MOD) * modinv(math.factorial(n-r), MOD) % MOD
    # return math.factorial(n) // math.factorial(r) // math.factorial(n-r)
 
N, K = [int(x) for x in input().split()]
 
for i in range(1, K+1):
    if N-K+1 < i:
        ans = 0
    else:
        ans = (combination(N-K+1, i) * math.factorial((K-i)+(i-1)))%MOD * (modinv(math.factorial(K-i), MOD)%MOD) * (modinv(math.factorial(i-1), MOD)%MOD)
 
    print(ans%MOD)
# -coding: utf-8 -

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

s = range(a,b+1)
add = "\n"
#print(s)

if len(s) < k*2:
    strs = [str(num) for num in s]
    k = add.join(strs)
else:
    s_left = s[:k]
    s_right = s[-k:]
    s2 = s_left+s_right
    strs = [str(num) for num in s2]
    k = add.join(strs)
print(k)



### FIXED CODE ###

# -coding: utf-8 -

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

s = range(a,b+1)
s_small = s[:k]
s_large = s[-k:]
ans = list(set(s_small)|set(s_large))
ans = sorted(ans)
for i in ans:
    print(i)
n=int(input())
def eratos(n):
   prime_list =set ()
   num_list=set()
   for i in range(2, int(n**0.5)+1):
       if i not in num_list:
           prime_list.add(i)
           for j in range(i*i, n+1, i):
               num_list.add(j)
   return(prime_list)
print(s)
x=int(n**0.5)
while 1:
    if x in s and n%x==0:
        break
    x-=1
print(x+(n//x)-2)

### FIXED CODE ###

n=int(input())
a=1
ans=n
while a*a<=n:
    if n%a==0:
        ans=min(a+n//a-2,ans)
    a+=1
print(ans)
#66 A - Two Abbreviations
import math
N,M = map(int,input().split())
S = input()
T = input()

L = N*M//math.gcd(N,M)

dist_N = L//N
dist_M = L//M
lis = [0]*L
i = 0
for n in range(0,L,dist_N):
    if i == len(S):
        break
    lis[n] = S[i]
    i+=1
j = 0
for m in range(0,L,dist_M):
    if j == len(T):
        break
    if lis[m] == 0:
        lis[m] = T[j]
        j += 1
    else:
        if lis[m] == T[j]:
            j += 1
        else:
            L = -1
            break
ans = L
print(ans)

### FIXED CODE ###

#66 A - Two Abbreviations
import math
N,M = map(int,input().split())
S = input()
T = input()

GCD = math.gcd(N,M)
L = N*M//GCD

dist_N = L//N
dist_M = L//M

# 同じ位置に書く文字は最大公約数 + 1 だけ存在する
for i in range(GCD):
    # S の s 文字目と T の t 文字目が同じ位置に来る
    s = dist_M * i
    t = dist_N * i
    if S[s] != T[t]:
        ans = -1
        break
else:
    ans = L
print(ans)
n, m = map(int, input().split())
a = list(map(int, input().split()))

total = sum(a)

count = 0

valid = total / (4 * m)

for i in a:
    if i > valid:
        count += 1

if count >= m:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

x, y, z = map(int, input().split())

x, y = y, x
x, z = z, x

print(x, y, z)
N, X = map(int, input().split())
L = list(map(int, input().split()))

d = 0
cnt = 0
while d <= X:
    cnt += 1
    d += L[cnt-1]
    if cnt == N + 1:
        break
print(cnt)

### FIXED CODE ###

N, X = map(int, input().split())
L = list(map(int, input().split()))

d = 0
cnt = 0
while d <= X:
    cnt += 1
    if cnt == N + 1:
        break
    d += L[cnt-1]
print(cnt)
import numpy as np
import heapq

n, m= map(int, input().split())

links = []

sums = np.zeros(n + 1)

oya = {}

for _ in range(n - 1):
  a, b= map(int, input().split())
  oya[b] = a
  heapq.heappush(links, [a, b])

uppers = np.eye(n + 1)

for l in links:
  oyaId = l[0]
  koId = l[1]

  while True: 
    uppers[oyaId, koId] = 1
    if oyaId != 1:
      oyaId = oya[oyaId]
    else:
      break
      
for _ in range(m):
  p, x = map(int, input().split())
  sums += x * uppers[p, :]
print(*sums[1:].astype(np.int))
  

### FIXED CODE ###

from collections import defaultdict

n, m= map(int, input().split())

links = [[] for x in range(n + 1)]
sums = [0 for x in range(n + 1)]
adds = [0 for x in range(n + 1)]

links[0].append(1)
for _ in range(n - 1):
  a, b= map(int, input().split())
  links[a].append(b)
  links[b].append(a)

for _ in range(m):
  p, x = map(int, input().split())
  adds[p] += x

# print(links)
que = [0,[1]]
checked = [0 for x in range(n+1)]

que = [[-1, [0]]]

while que:
  link = que.pop()
  # print(link)
  par = link[0]
  childs = link[1]

  for child in childs:
    if checked[child] != 1:
      sums[child] = sums[par] + adds[child]
      que.append([child, links[child]])
      checked[child] = 1

  
print(*sums[1:])
a,b=map(int,input().split())
return max(a+b,2*a-1,2*b-1)

### FIXED CODE ###

a,b=map(int,input().split())
print(max(a+b,2*a-1,2*b-1))
N = int(input())
A = list(map(int, input().split()))


def make_m(i, m):
    if m == 0:
        return True
    if i >= N or m < 0:
        return False

    return make_m(i+1, m) or make_m(i+1, m-A[i])


def main():
    q = int(input())
    m_lst = list(map(int, input().split()))

    for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    main()



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
M_DICT = {}


def make_m(i, m):
    if (i, m) in M_DICT:
        return M_DICT[(i, m)]
    if m == 0:
        return True
    if i >= N or m < 0:
        return False

    res = make_m(i+1, m) or make_m(i+1, m-A[i])
    M_DICT[(i, m)] = res
    return res


def main():
    q = int(input())
    m_lst = list(map(int, input().split()))

    for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    main()
n,k,x,y=(int(input()) for i in [0]*4)
print(n*x-(x-y)*max(n-k,0))

### FIXED CODE ###

x,a,b=[int(input()) for i in range(3)]
print((x-a)%b)
N = int(input())
A = [int(input()) for _ in range(N)]


class SegmentTree():
    def __init__(self, array, f, e, size):
        """
        Parameters
        ----------
        array : list
            to construct segment tree from
        f : func
            binary operation of the monoid
        e : 
            identity element of the monoid
        size : int
            limit for array size
        """
        self.f = f
        self.e = e
        self.size = size
        self.n = n = len(array)
        self.dat = dat = [e] * n + array + [e] * (2 * size - 2 * n)
        for i in range(n - 1, 0, -1):  # build
            dat[i] = f(dat[i << 1], dat[i << 1 | 1])

    def modify(self, p, v):  # set value at position p (0-indexed)
        f, n, dat = self.f, self.n, self.dat
        p += n
        dat[p] = v
        while p > 1:
            dat[p >> 1] = f(dat[p], dat[p ^ 1])
            p >>= 1

    def query(self, l, r):  # result on interval [l, r) (0-indexed)
        f, e, n, dat = self.f, self.e, self.n, self.dat
        res = e
        l += n
        r += n
        while l < r:
            if l & 1:
                res = f(res, dat[l])
                l += 1
            if r & 1:
                r -= 1
                res = f(res, dat[r])
            l >>= 1
            r >>= 1
        return res


size = 10**5+5
e = (0,0)
def f2(xs,ys):
    if ys[0]>0:
        return ys
    else:
        return xs
ST = SegmentTree(list(zip([size]+[0]*(size-1),range(size))), f=lambda x,y:f2(x,y), e=e, size=size)
ans = 0
for a in A:
    bs = ST.query(0,a)
    if bs[1]==0:
        c=ST.query(a,a+1)[0]
        ST.modify(a,(c+1,a))
        ans+=1
    else:
        c=ST.query(a,a+1)[0]
        ST.modify(a,(c+1,a))
        ST.modify(bs[0],(bs[0],bs[1]-1))
print(ans)


### FIXED CODE ###

from bisect import bisect_right as br
INF = 10 ** 10
n = int(input())
alst = [int(input()) for _ in range(n)][::-1]
dp = [INF] * (n + 1)
dp[0] = -1
ans = 0
for a in alst:
  ind = br(dp, a)
  dp[ind] = a
  ans = max(ans, ind)
print(ans)
n = int(input())
dic = {}　#空の辞書を定義

for index in range(n):
    temp = ''.join(sorted(list(input())))
    #入力された文字列をa-z順にソートし、変数tempに代入
    if temp in dic:
        dic[temp] = dic[temp] + 1
        #すでに同じ文字列の入力があれば、key:tempのvalueに+1
    else:
        dic[temp] = 1
        #新しい文字列の場合は文字列とvalue＝1を辞書に追加
ans = 0

for k in dic.values():
    cnt = 0
    for i in range(k):
        cnt += i
    ans += cnt
print(ans)


### FIXED CODE ###

import math
n = int(input())
dic = {}
def combinations_count(n,r):
    return math.factorial(n) // (math.factorial(n - r)*math.factorial(r))

for index in range(n):
    temp = ''.join(sorted(list(input())))
    #入力された文字列をa-z順にソートし、変数tempに代入
    if temp in dic:
        dic[temp] = dic[temp] + 1
        #すでに同じ文字列の入力があれば、key:tempのvalueに+1
    else:
        dic[temp] = 1
        #新しい文字列の場合は文字列とvalue＝1を辞書に追加
ans = 0

for k in dic.values():
    if k >= 2:
        ans += combinations_count(k,2)
    else:
        ans = ans
print(ans)
N, M = map(int, input().split())
A = list(map(int, [input() for _ in range(M)]))

step = [1 for _ in range(N + 1)]
step[0] = 1
step[1] = 1

for i in A:
    dp[i] = 0

for i in range(2, N + 1):
    if step[i] == 1:
        step[i] = step[i-1] + step[i-2]

print (step[-1] % 1000000007)


### FIXED CODE ###

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

step = [0 for _ in range(N + 2)]
step[1] = 1

for _ in range(M):
  i = int(input()) + 1
  step[i] = -1

for i in range(2, N + 2):
  if step[i] == -1:
    step[i] = 0
  else:
    step[i] = step[i - 2] + step[i - 1]

print (step[-1] % 1000000007)
# coding: utf-8

s=str(input())

if s=="AAA" or s="BBB":
    print("No")
else:
    print("Yes")

### FIXED CODE ###

# coding: utf-8

s=str(input())

if s=="AAA" or s=="BBB":
    print("No")
else:
    print("Yes")
n = int(input())
an = [int(i) for i in input().split()]
score = [0]*9
ans = 0

for i in an:
  score[i//400] += 1

for i in score[:8]:
  if i:
    ans += 1
print(ans,ans+score[8])

### FIXED CODE ###

input()
an = [int(i) for i in input().split()]
score = [0]*13
ans = 0

for i in an:
  score[i//400] += 1   
for i in score[:8]:
  if i:
    ans += 1

k = sum(score[8:])

if ans == 0 and k:
  print(1,k)
else:
  print(ans,ans+k)
H, W = map(int, input.split())
h, w = map(int, input.split())
print((H-h)*(W-w))

### FIXED CODE ###

H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w))
N,K = map(int,input().split())
H = list(map(int,input().split()))
H = sorted(H)[::-1]
for i in range(K):
  del H[0]
print(str(sum(H)))

### FIXED CODE ###

N,K = map(int,input().split())
H = list(map(int,input().split()))
H = sorted(H)[::-1]
del H [0:K]
print(str(sum(H)))
import itertools
# import math

MOD = 10 ** 9 + 7


def solve(N, K, A):
    A.sort()
    ans = 0

    for group in list(itertools.combinations(A, K - 1)):
        ans += max(group) - min(group)

    return ans % MOD


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

print(solve(N, K, A))


### FIXED CODE ###

# import itertools
# import math

# N = int(input())
# S = input()
N, M = map(int, input().split())
# A = list(map(int, input().split()))

ans_p = [0] * N
ans_s = [0] * N

for i in range(M):
    input_sp = input().split()
    P = int(input_sp[0]) - 1
    S = input_sp[1]

    if S == 'AC':
        ans_s[P] = 1
    elif S == 'WA' and ans_s[P] == 0:
        ans_p[P] += 1

for i in range(len(ans_p)):
    if ans_s[i] == 0 and ans_p[i] != 0:
        ans_p[i] = 0

print(str(sum(ans_s)) + " " + str(sum(ans_p)))
N = int(input())
 
t = [int(input().split()) for i in range(N)]
 
M = int(input())
 
a = []
for k in range(M):
    a.append(map(int, input()))       
 
cal = sum(t)
 
for j in range(M):
    print(cal - t[a[j][0] - 1] + a[j][1])

### FIXED CODE ###

N = int(input())
 
t = list(map(int, input().split()))
 
M = int(input())
 
cal = sum(t)
 
for j in range(M):
    p, x = map(int, input().split())
    print(cal - t[p - 1] + x)
#ABC130 B

N,X = map(int,input().split())
L = list(map(int,input().split()))
D = [0,L[0]]
count = 0
for i in range(2,N+2):
    D.append(D[i-1]+L[i-2])
for i in range(0,N+2):
    if D[i]<= X:
        count += 1

print(count)

### FIXED CODE ###

#ABC130 A

X,A = map(int,input().split())
if X < A:
    print(0)
else:
    print(10)
n=int(input())
l=[int(i) for i in input().split()]
from collections import Counter
import math
lst=list(Counter(l).items())
lst.sort(reverse=True)
num=0
for i in range(n):
    if lst[i][1]>3:
        if num==0:
            ans=lst[i][0]**2
            break
        elif num==1:
            ans*=lst[i]
            num+=1
            break
    elif 1<lst[i][1]<=3:
        if num==0:
            ans=lst[i][0]
            num+=1
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    else:
        continue
if num==2:
    print(ans)
else:
    print(0)

### FIXED CODE ###

n=int(input())
l=[int(i) for i in input().split()]
from collections import Counter
lst=list(Counter(l).items())
lst.sort(reverse=True)
num=0
for i in range(n):
    if lst[i][1]>3:
        if num==0:
            ans=lst[i][0]**2
            num+=2
            break
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    elif 1<lst[i][1]<=3:
        if num==0:
            ans=lst[i][0]
            num+=1
        elif num==1:
            ans*=lst[i][0]
            num+=1
            break
    else:
        continue
if num==2:
    print(ans)
else:
    print(0)
import math
n, m,X = map(int, input().split(),1)
for i in range(1,32000):
	if m%i==0:
		if i*n<=m:
			X=max(X, i)
		if (m//i)*n<=m:
			X=max(X, m//i)
print(X)

### FIXED CODE ###

import math
n, m = map(int, input().split())
kotae=1

for i in range(1,int(math.sqrt(m))+1):
	if m%i==0:
		if i*n<=m:
			kotae=max(kotae, i)
		if (m//i)*n<=m:
			kotae=max(kotae, m//i)
print(kotae)
from itertools import product

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

lima = [100 * a * i for i in range(f // (100 * a) + 1)]
limb = [100 * b * i for i in range(f // (100 * b) + 1)]
setw = set([i + j for i, j in product(lima, limb) if 0 < i + j <= f])
limc = [c * i for i in range(f // c + 1)]
limd = [d * i for i in range(f // d + 1)]
sets = set([i + j for i, j in product(limc, limd) if 0 < i + j <= f])

cnt = 0
for w in setw:
    for s in sets:
        if (cnt <= 100 * s / w <= e) and (s + w <= f):
            cnt = 100 * s / w
            ans = s + w, s
else:
    print(*ans)


### FIXED CODE ###

from itertools import product

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

lima = [100 * a * i for i in range(f // (100 * a) + 1)]
limb = [100 * b * i for i in range(f // (100 * b) + 1)]
setw = set([i + j for i, j in product(lima, limb) if 0 < i + j <= f])
limc = [c * i for i in range(f // c + 1)]
limd = [d * i for i in range(f // d + 1)]
sets = set([i + j for i, j in product(limc, limd) if 0 < i + j <= f])

cnt, ans = 0, (max(setw), 0)
for w in setw:
    for s in sets:
        if (cnt <= 100 * s / w <= e) and (s + w <= f):
            cnt = 100 * s / w
            ans = s + w, s
else:
    print(*ans)
import sys
sys.setrecursionlimit(9**9)
def P(a,n,p):
  bi=str(format(n,"b"))
  res=1
  for i in range(len(bi)):
    res=(res*res)%p
    if bi[i]=="1":
      res=(res*a)%p
  return res
n,a,b=map(int,input().split())
a,b=min(a,n-a),min(b,n-b)
m=10**9+7
N=min(n,2*10**5)
inv=[0 for _ in range(max(a,b))]
inv[1]=1
if max(a,b)>1:
  for i in range(2,max(a,b)):
    inv[i]=m-inv[m%i]*(m//i)%m
def C(n,r,a):
  for i in range(r):
    a=a*(n-i)*inv[r-i-1]%m
  return a
A,B=C(n,a,1),C(n,b,1)
print((P(2,n,m)-int(A)-int(B)-1+m)%m)

### FIXED CODE ###

n,a,b=map(int,input().split())
c=d=1
e=0
m=10**9+7
for i in range(1,b+1):
    c=(c*(n+1-i))%m
    d=(d*i)%m
    if i==a or i==b:
        e+=c*pow(d,m-2,m)%m
print((pow(2,n,m)-e-1)%m)
s=input().split()
a=s[0]/s[1]
print(a)

### FIXED CODE ###

s=input().split()
a=float(s[0])/float(s[1])
print(a)
x = int(input)
if x==3 or x==5 or x==7:
    print('YES')
else:
    print('NO')


### FIXED CODE ###

x = int(input())
if x==3 or x==5 or x==7:
    print('YES')
else:
    print('NO')
n,m=map(int,input().split())

if n>=2 and m>=2:
    print((n-2)*(m-2))

elif n==1 and m!=1:
    print(m-2)

elif m==1 and n!=1:
    print(n-2)
elif n==1 and m==1:
  print(1)

### FIXED CODE ###

a=input()
b=input()
c=input()

print('{}{}{}'.format(a[0],b[1],c[2]))
s = input()
dp = [[0 for i in range(13)] for i in range(len(s))]
r_0 = int(s[-1]) % 13
dp[0][r_0] = 1

for i in range(1,len(s)):
    for r in range(13):
        if s[-(i+1)] != "?":
            j = (int(s[-(i+1)]) * (10**i) + r) % 13
            dp[i][j] += dp[i-1][r]
        else:
            for k in range(10):
                j = (k * (10**i) + r) % 13
                dp[i][j] += dp[i-1][r]
print(dp[len(s)-1][5]%(10**9+7))


### FIXED CODE ###

s = input()
dp = [[0 for i in range(13)]]
if s[-1] != "?":
    dp[0][int(s[-1]) % 13] += 1
else:
    for k in range(10):
        dp[0][k % 13] += 1
        
d = [1]   
for i in range(1,len(s)):
    dp.append([0]*13)
    d.append(d[i-1]*10 % 13)
    for r in range(13):
        if s[-(i+1)] == "?":
            for k in range(10): 
                dp[i][(k * d[i] + r) % 13] += dp[i-1][r] % (10**9 + 7)
                
        else:
            dp[i][(int(s[-(i+1)]) * d[i] + r) % 13] += dp[i-1][r] % (10**9 + 7)

print(dp[len(s)-1][5]%(10**9+7))
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
    print(0)
    quit()
for i in range(N):
    output = 1
    output *= a[i]
    if output> 10**18:
        print(-1)
        quit()
print(output)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
output = 1
if 0 in A:
    print(0)
else:
    for i in range(N):
        output *= A[i]
        if output> 10**18:
            print(-1)
            quit()
    print(output)
X, Y = input().split()
X = int(X, 16)
Y = int(Y, 16)

if A < B:
    print('<')
elif A > B:
    print('>')
else:
    print('=')

### FIXED CODE ###

X, Y = input().split()
X = int(X, 16)
Y = int(Y, 16)

if X < Y:
    print('<')
elif X > Y:
    print('>')
else:
    print('=')
n,m = map(int,input().split())
graph = [[0*n] for j in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    graph[a-1][b-1] = 1
    graph[b-1][a-1] = 1

flag = False
for i in range(n):
    if graph[0][i] == 1:
        if graph[i][n-1] == 1:
            flag = True
            break
                
if flag:
    print("POSSIBLE")
    
else:
    print("IMPOSSIBLE")


### FIXED CODE ###

n,m = map(int,input().split())
c = [False for i in range(200000)]
d = [False for i in range(200000)]
for i in range(m):
    a,b = map(int,input().split())
    if a == 1:
        c[b] = True 
    if b == n:
        d[a] = True
        
flag = False
for i in range(200000):
    if c[i] and d[i]:
        flag = True
        break
if flag:
    print("POSSIBLE")
    
else:
    print("IMPOSSIBLE")
n=int(input())
l=list(map(int,input().split()))
l2=[0]*(n+1)
for i,j in enumerate(l,1):
    l2[j]=i
l2.remove(0)    
print(' '.join(map(str,l2)))    


### FIXED CODE ###

n=int(input())
if n%2==0:
    print(1/2)
else:
    print((1+n)/(2*n))
n,k=map(int,input().split())
if k=0:
    print(0)
else:
    print(n-k)



### FIXED CODE ###

n,k=map(int,input().split())
if k==1:
    print(0)
else:
    print(n-k)
y, m, d = map(int, input().splite(' '))

if y < 2019:
	print("Heisei")
elif y == 2019:
	if m < 4 or (m == 4 and d < 30):
     	print("Heisei")
	else:
    	print("TBD")
else:
    print("TBD")

### FIXED CODE ###

y, m, d = map(int, input().split('/'))
 
if y < 2019:
	print("Heisei")
elif y == 2019:
	if m < 4 or (m == 4 and d <= 30):
		print("Heisei")
	else:
		print("TBD")
else:
	print("TBD")
N=int(input())
A=int(input())
 
if N % 500 <= A:
print("Yes")
else:
print("No")

### FIXED CODE ###

N=int(input())
A=int(input())
 
if N % 500 <= A:
  print("Yes")
else:
  print("No")
n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(len(d)):
  for j in range(len(d)-i):
    if i == j:
      continue
   	ans += d[i] * d[j]
print(ans)

### FIXED CODE ###

n = int(input())
d = list(map(int, input().split()))
ans = 0
for i in range(len(d)):
    for j in range(i + 1, len(d)):
        if i == j:
            continue
        ans += d[i] * d[j]
print(ans)
b = input()

if b == 'A':
    b = 'T'
elif b == 'C':
    b = 'G'
elif b == 'T':
    b = 'A'
elif b == G:
    b = 'C'

print(b)

### FIXED CODE ###

b = input()

if b == 'A':
    b = 'T'
elif b == 'C':
    b = 'G'
elif b == 'T':
    b = 'A'
elif b == 'G':
    b = 'C'

print(b)
flag = [False] * 53
n = int(input())
for i in range(n):
    c, n = map(str, input().split())
    n = int(n)
    if(c == "S"):
        flag[n] = True
    elif(c == "H"):
        flag[13 + n] = True
    elif(c == "C"):
        flag[26 + n] = True
    else:
        flag[39 + n] = True
suit = ["S", "H", "C", "D"]
for i in range(1, len(flag)):
    if(flag[i] == False):
        print(suit[i // 13], i % 13)

### FIXED CODE ###

flag = [False] * 53
n = int(input())
for i in range(n):
    c, n = map(str, input().split())
    n = int(n)
    if(c == "S"):
        flag[n] = True
    elif(c == "H"):
        flag[13 + n] = True
    elif(c == "C"):
        flag[26 + n] = True
    else:
        flag[39 + n] = True
suit = ["S", "H", "C", "D"]
for i in range(1, len(flag)):
    if(flag[i] == False):
        print(suit[(i - 1) // 13], (i - 1) % 13 + 1)
n=int(input())
if n==1:
    print("Hello Wrold ")
elif n==2
    a=int(input())
    b=int(input())
    print(a+b)

### FIXED CODE ###

n=int(input())
if n==1:
    print("Hello World")
elif n==2:
    a=int(input())
    b=int(input())
    print(a+b)
import fractions
from functools import reduce

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
ans = lcm_list(T)

print(ans)

### FIXED CODE ###

#import math  
import fractions
from functools import reduce

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
ans = lcm_list(T)

print(ans)
#ABC129C-TypicalStairs.py

#import list
from sys import stdin
from functools import lru_cache

input = stdin.readline

#constant
#N = int(input())
N, M = list(map(int,input().split()))
A = [int(input()) for _ in range(M)]

#variable

#function
#@lru_cache(maxsize=None)
def rootCount(position):
    if position < 0:
        return 0
    elif position == 0:
        return 1
    elif position in A:
        return 0
    else:
        return rootCount(position-1)+rootCount(position-2)
#class

#main function
def main():
    print(rootCount(N)%1000000007)




if __name__ == "__main__":
    main()


### FIXED CODE ###

#ABC129C-TypicalStairs.py

#import list
import numpy as np
from sys import stdin, setrecursionlimit
from functools import lru_cache

input = stdin.readline
setrecursionlimit(1000)

#constant
#N = int(input())
N, M = list(map(int,input().split()))
A = {int(input()) for _ in range(M)}

#variable
rootList = np.array([1]+[0]*(N))

#function

#class

#main function
def main():
    for i in range(N):
        rootList[i+1] = (rootList[i]+rootList[i-1])%1000000007
        if i+1 in A:
            rootList[i+1] = 0
    print(rootList[N])

if __name__ == "__main__":
    main()
import math
R=float(import())
L=2*math.pi*R

### FIXED CODE ###

import math
R=float(input())
L=2*math.pi*R
print(L)