peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
import sys

n = []
n.append('Sunny')
n.append('Cloudy')
n.append('Rainy')

s = input()

for i in n:
  if(i == s):
    print(n[len(n)%3 + 1])
    sys.exit()
# Judge status: Wrong Answer
import collections
s=str(input())
s = list(map(int, input().split()))
q = int(input())
x = [list(map(int,input().split())) for i in range(q)]
c = collections.Counter(s)
ans=s
for i in range(q):
    if x[i][0] not in c.keys():
        print(ans)
        continue
    tmp = c[x[i][0]]
    c[x[i][0]] = 0
    c[x[i][1]] = c[x[i][1]]+tmp
    ans=0
    for j in c.keys():
        ans+=j*c[j]
    print(ans)
# Judge status: Accepted
s = input()
t = set(['a', 'b', 'c'])
u = set()
for i in s:
  u.add(i)
print('Yes' if t == u else 'No')
# Judge status: Accepted
K=int(input())
if K<10:
  print(K);exit()
def dfs(v,n):
  u=[]
  for x in v:
    for d in [-1,0,1]:
      if(0<=x%10+d<=9):
        u.append(x*10+x%10+d)
  if(n+len(u)>=K):
    u.sort()
    print(u[K-n-1])
  else:
    dfs(u,n+len(u))
dfs(range(1,10),9);
# Judge status: Accepted
if __name__ == "__main__":
    N, M = input().split()
    
    if N>=M:
        print(M*int(N))
    else:
        print(N*int(M))
# Judge status: Accepted
n = 5
t = [int(input()) for _ in range(n)]

last, min = 0, 9
for i in range(n):
    if t[i] % 10 < min:
        if t[i] % 10 == 0:
            continue
        last = i
        min = t[i] % 10

ans = 0
for i in range(n):
    if i == last:
        continue
    if t[i] % 10 == 0:
        diff = 0
    else:
        diff = 10 - t[i] % 10
    ans += t[i] + diff

ans += t[last]

print(ans)
# Judge status: Accepted
h = int(input())
w = int(input())
n = int(input())
if h < w:
    h,w = w,h

ans = -(-n//h)
print(ans)
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
N,K = [int(i) for i in input().split()]
if N < K :
    print(1)
else :
    print(N%K)
# Judge status: Wrong Answer
dic = {
  "a":list(input()),
  "b":list(input()),
  "c":list(input())
}

now = "a"
while True:
  if len(dic[now]) == 0:
    print(now.upper())
    break
  now = dic[now][0]
  dic[now].pop(0)
# Judge status: Accepted
A,B,C,K=map(int,input().split())
ans=0
if A>K:
    ans=K
elif A+B>=K:
    ans=A
else:
    ans=A-(K-A-B)
print(ans)
# Judge status: Accepted
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

K,A,B = MI()

if B-A <= 2 or K <= A-1:
    print(1+K)
else:
    K -= A-1
    print(A+(B-A)*(K//2) + K % 2)
# Judge status: Accepted
N = int(input())
if N >= 1000:
    print('ABD')
else:
    print('ABC')
# Judge status: Accepted
import collections
N = int(input())
A = list(map(int, input().split()))
count = collections.Counter(A)

for i in range(1,N+1):
  print(count[i])
# Judge status: Accepted
n,k = map(int,input().split())
h = list(map(int,input().split()))
dp = [float("inf")]*(n+1)
dp[1] = 0

for i in range(1,n+1):
  for j in range(max(1,i-k),i):
    dp[i] = min(dp[i],dp[j]+abs(h[i-1]-h[j-1]))
print(dp[-1])
# Judge status: Accepted
n,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
b = []
for i in range(m-1):
  b.append(a[i+1] - a[i])
b.sort(reverse=True)
del b[:n-1]
print(sum(b))
# Judge status: Accepted
N, x = map(int, input().split())
ai = list(map(int, input().split()))
gokei = 0
if ai[0] > x:
    gokei += ai[0] - x
    ai[0] = ai[0] - (ai[0] - x)

for i in range(N - 1):
    taberu = ai[i] + ai[i+1] - x
    if taberu > 0:
        gokei += taberu
        ai[i+1] = ai[i+1] - taberu 
print(gokei)
# Judge status: Wrong Answer
import numpy
a,b = map(int,input().split())

ans=a
c=a+1
while c<=b:
  ans = ans * c
  c = c + 1
pm = numpy.sign(ans)
if pm==0:
  print('zero')
elif pm==1:
  print('Positive')
else:
  print('Negative')
# Judge status: Accepted
n, k, q = map(int, input().split())
aa = []
for i in range(q):
    aa += [int(input())]

from collections import Counter
dic = Counter(aa)

cnt = 0
for i in range(1,n+1):
    if dic.get(i, 0) > q-k:
	    print('Yes')
    else:
        print('No')
# Judge status: Accepted
a, b = map(int, input().split())
s = input()

def is_int(s):
    try:
        int(s)
        return True
    except ValueError:
        return False

ans = 0
if is_int(s[0:a]) == True:
    if s[a] == "-":
        if is_int(s[a+1:]) == True:
            print("Yes")
            ans = 1
if ans == 0:
    print("No")
# Judge status: Accepted
n,m=map(int,input().split())
if 2*n>m:
    print(m//2)
else:
    print(n+(m-2*n)//4)
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))
ans = 0
tmp = 0
pre = -1
for h in H:
    if h <= pre:
        tmp += 1
        ans = max(ans, tmp)
    else:
        tmp = 0
    pre = h
print(ans)
# Judge status: Wrong Answer
from functools import reduce

MOD = 10 ** 9 + 7

_ = int(input())
la = list(map(int, input().split()))


def inv(a):
    return pow(a, MOD - 2, MOD)


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b * inv(gcd(a, b))


def addmod(a, b):
    return (a + b) % MOD


l = reduce(lcm, la)
answer = reduce(addmod, (l * inv(a) for a in la))
print(answer)
# Judge status: Accepted
x = int(input())
print(1 if x % 100 - x // 100 * 5 <= 0 else 0)
# Judge status: Wrong Answer
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()
a = nl()

cnt = 0
shift = 0
for i in range(n):
  if(a[cnt+shift]==cnt+1):
    cnt+=1
  else:
    shift+=1

if(shift==n-1):
  print(-1)
  exit()

print(shift)
# Judge status: Accepted
S = input()
temp = {'Sunny':'Cloudy','Cloudy':'Rainy','Rainy':'Sunny'}
print(temp[S])
# Judge status: Accepted
MOD = 10**9 + 7
N, K = [int(s) for s in input().split()]
cnt = 0
for i in range(K, N + 2):
    if i != N + 1:
        cnt += i * ((N + 1) - i) + 1
    else:
        cnt += 1
    cnt %= MOD

print(cnt)
# Judge status: Accepted
N = int(input())
P = list(map(int, input().split()))

sort_P = list(range(1, N+1))
wrong = 0

for i in range(N):
    if P[i] != sort_P[i]:
        wrong += 1

if wrong > 2:
    print("NO")
else:
    print("YES")
# Judge status: Accepted
def solve():
    N,X = map(int,input().split())
    L = list(map(int, input().split()))
    D = 0
    count = 1
    for i in range(N):
        D += L[i]
        count += 1 if D <= X else 0

    print(count)

if __name__ == '__main__':
    solve()
# Judge status: Accepted
n = int(input())
l = list(map(int,input().split()))
count = 0
if l[0] == 1:
  l[1] = l[0]
  count += 1
for i in range(1,n):
  if l[i] == i+1:
    if i != n-1:
      if l[i+1] == i+2:
        l[i],l[i+1] = l[i+1],l[i]
        i+=1
    else:
      l[i] = l[i-1]
    count += 1
print(count)
# Judge status: Wrong Answer
a = list(map(int, input().split()))
x = -1
y = -1
z = -1
for i in range(a[0]):
    for j in range(a[0]-i):
        b = 10000*i + 5000*j + 1000*(a[0]-(i+j))
        if b == a[1]:
            x = i
            y = j
            z = a[0]-(i+j)
            break
    else:
        continue
    break
print(i, end=" ")
print(j, end=" ")
print(a[0] - (i + j))
# Judge status: Accepted
# import sys
# input = sys.stdin.readline
import collections
import itertools

def main():
    n, k = input_list()
    a = input_list()
    if (n - 1) % (k - 1) == 0:
        print((n-1) // (k-1))
    else:
        v = (n-1) // (k-1)
        print(v + 1)


def input_list():
    return list(map(int, input().split()))


def input_list_str():
    return list(map(str, input().split()))


if __name__ == "__main__":
    main()
# Judge status: Accepted
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
N,D = map(int,input().split())
ans = (N-1) // (2*D+1) + 1
print(ans)
# Judge status: Wrong Answer
x, y = map(int,input().split())

print(x + (y / 2))
# Judge status: Accepted
import math
n = int(input())
a = list(map(int,input().split()))
l = [0]
r = [0]
for i in range(n-1):
    #左から見ていく
    l.append(math.gcd(l[i],a[i]))
    #右から見ていく
    r.append(math.gcd(r[i],a[-1-i]))
r = r[::-1]
ans = 0
for i in range(n):
    ans = max(ans,math.gcd(l[i],r[i]))
print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
if a>=13:
    ans=b
elif a>=6:
    ans=int(b/2)
else:
    ans=0
print(ans)
# Judge status: Accepted
import math
N,D=map(int,input().split())
print(math.ceil(N/(D*2+1)))
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))
sum_A=sum(A)

if n==0 and A[0]==1:print(1);exit()
if n==0 and A[0]==0:print(-1);exit()
if A[0]!=0:print(-1);exit()

flag=0
ans,point=[1],1
for i in range(1,n+1):
    if point<=0 or sum_A<=0:print(-1);exit()
    if flag==0:
        point *=2
    if point>=sum_A:
        point=sum_A
        flag=1
    ans.append(point)
    point -=A[i]
    sum_A -=A[i]
if sum_A!=0 or point!=0:print(-1);exit()
print(sum(ans))
# Judge status: Accepted
a=int(input())
if a<105:
  print(0)
if 105<=a<135:
  print(1)
if 135<=a<165:
  print(2)
if 165<=a<189:
  print(3)
if 189<=a<195:
  print(4)
if 195<=a:
  print(5)
# Judge status: Accepted
from itertools import accumulate

n = int(input())
W = list(map(int, input().split()))
WR = W[::-1]
ans = 10 ** 20
SW = list(accumulate([0] + W))
SWR = list(accumulate([0] + WR))
for i in range(1, n):
    j = n - i
    temp = abs(SW[i] - SWR[j])
    ans = min(ans, temp)
print(ans)
# Judge status: Accepted
k, x = map(int ,input().split())

if k * 500 >= x:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
t = str(input())
print(t.replace('?','D'))
# Judge status: Accepted
n,d = map(int, input().split())

t = n//(2*d+1)
if n > t*(2*d+1):
    print(t+1)
else:
    print(t)
# Judge status: Accepted
S = []
for i in range(3):
    tmp = list(input())
    S.append(tmp)
turn = 0
while True:
    if len(S[turn]) == 0:
        print(chr(ord('A')+turn))
        break
    next = ord(S[turn][0]) - ord('a')
    del S[turn][0]
    turn = next
# Judge status: Accepted
n =int( input())
n_mod = n % 10
if n_mod == 3:
    print('bon')
elif n_mod == 0 or n_mod == 1 or n_mod == 6 or n_mod == 8:
    print('pon')
else:
    print('hon')
# Judge status: Wrong Answer
n = int(input())
a = int(input())

mod = n % 500
print("Yes" if a <= mod else "No")
# Judge status: Wrong Answer
from math import sqrt
X = int(input())
N = int(sqrt(X))
print(N**2)
# Judge status: Accepted
def check(x,k,arr):
    now = 0
    for i in range(len(arr)):
        now+=int((arr[i]-1)/x)
    return now<=k

n, k = map(int,input().split())
arr = list(map(int,input().split()))

r, l = 1e9, 0
while (l+1<r):
    x = int((r+l)/2)
    if check(x,k,arr):
        r = x
    else:
        l = x
print(int(r))
# Judge status: Accepted
pc = ""
for c in list(input()):
  if pc == c:
    print('Bad')
    exit()
  else:
    pc = c
print('Good')
# Judge status: Wrong Answer
import collections
n=int(input())
A=list(map(int,input().split()))
mod=998244353
C=[0]*n
for i in range(n):
  C[A[i]]+=1
ans=1
for i in range(n-1):
  ans=ans*pow(C[i],C[i+1],mod)%mod
print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

while True:
    min_num = min(a)
    min_ind = a.index(min_num) 
    a = [n % min_num for n in (a[:min_ind] + a[min_ind+1:]) if n % min_num != 0]
    if a == []:
        print(min_num)
        exit()
    a.append(min_num)
# Judge status: Wrong Answer
from fractions import gcd

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

maxGCD = 0
for i in range(N):
    for j in range(N):
        if j == i:
            pass
        else:
            if i == 0:
                ans = A[1]
                ans = gcd(ans, A[j])
            else:
                ans = A[0]
                ans = gcd(ans, A[j])
    if maxGCD < ans:
        maxGCD = ans
print(maxGCD)
# Judge status: Accepted
X = int(input())
while True:
    for i in range(2, X//2):
        if X % i == 0:
            X += 1
            break
    else:
        break
print(X)
# Judge status: Accepted
n=int(input())
a=list(map(int, input().split()))
x = 0
y = 0
for i in a:
    if i %2 != 0:
        x+=1
    elif i%4 == 0:
        y+=1
if y >=x:
    print('Yes')
    exit()
else:
    if x+y == len(a) and y == x-1:
        print('Yes')
    else:
        print('No')
# Judge status: Wrong Answer
t = list(input())

for i in range(len(t)):
  if t[i] != "?":
    continue
  else:
    if t[i-1] == "D":
      t[i] = "P"
    if t[i-1] == "P":
      t[i] = "D"
  print(i, t[i])
      
if t[-1] == "?":
  t[-1] = "D"
      
print(''.join(t))
# Judge status: Accepted
import sys
import math
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

x = math.ceil(N / 1.08)
if math.floor(x * 1.08) == N:
    print(x)
else:
    print(":(")
# Judge status: Accepted
A, B, C = map(int, input().split())

if A==B and B==C and C==A:
    print("No")
elif A!=B and B!=C and C!=A:
    print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
N=int(input())
A=list(map(int, input().split()))
L=sorted(set(A))
C=[]
for i in L:
  if A.count(i)>=2:
    C.append(i)
C=sorted(C)[::-1]    

if len(C)<2:
  print(0)
else:
  print(C[0]*C[1])
# Judge status: Wrong Answer
n = int(input())
masu = list(map(int, input().split()))
count = 0
for N in range(n):
  if (N*masu[N])%2 == 1:
    count += 1
print(count)
# Judge status: Wrong Answer
n = int(input())
a_list = list(map(int, input().split()))
a_list = sorted(a_list, reverse=True)
b_list = list(map(int, input().split()))
b_list = sorted(b_list, reverse=True)
c_list = list(map(int, input().split()))
c_list = sorted(c_list, reverse=True)
counter = 0
for _a in a_list:
    for _b in b_list :
        for _c in c_list:
            if _a > _b > _c:
                counter = counter + 1
print(counter)
# Judge status: Accepted
import sys

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

dp = [sys.maxsize] * N
dp[0] = 0
for i in range(1, N):
    limit = K if K <= i else i
    for j in range(1, limit + 1):
        a = abs(steps[i] - steps[i - j]) + dp[i - j]
        dp[i] = a if a < dp[i] else dp[i]

print(dp[N - 1])
# Judge status: Accepted
def cf(x1,x2):
    cf=[1]
    for i in range(2,min(x1,x2)+1):
        if x1 % i == 0 and x2 % i == 0:
            cf.append(i)
    return cf

A,B,K=map(int,input().split())
print(cf(A,B)[-K])
# Judge status: Accepted
def calc_trapezoid_area(top_length, under_length, height):    
    return (top_length + under_length) * height // 2

if __name__=='__main__':
    top_length, under_length, height = map(int, [input() for i in range(3)])
    print(calc_trapezoid_area(top_length, under_length, height))
# Judge status: Accepted
n, k = map(int, input().split())

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

for i in range(n):
	p[i] -= 1

current_pos = 0
steps = 0
first_occurence = {}

result = -1

while steps < k:
	if current_pos in first_occurence:
		first = first_occurence[current_pos]
		cycle_length = steps - first
		left = (k - steps) % cycle_length
		x = 0
		while x < left:
			current_pos = p[current_pos]
			x += 1

		result = current_pos
		break
	else:
		first_occurence[current_pos] = steps
		steps += 1
		current_pos = p[current_pos]

if result == -1:
	result = current_pos

print(current_pos + 1)
# Judge status: Accepted
inputValue=input()

l=inputValue.split(" ")
D=int(l[0])
T=int(l[1])
S=int(l[2])

if (D/float(S))<=T:
	print ("Yes")
else:
	print("No")
# Judge status: Accepted
n=int(input())
for i in range(1,10):
    if n%(10-i)==0:
        n/=(10-i)
        break
for j in range(1,10):
    if n%(10-j)==0:
        n/=(10-j)
        break
if n==1:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,m=map(int,input().split())
L=[]
for i in range(m):
    l=[i]+list(map(int,input().split()))+[0]
    L.append(l)
LS=sorted(L,key=lambda x:(x[1],x[2]))
LS[0][3]=1
for i in range(m-1):
    if LS[i][1]==LS[i+1][1]:
        LS[i+1][3]=LS[i][3]+1
    else:
        LS[i+1][3]=1
LR=sorted(L,key=lambda x:x[0])
for a,b,c,d in LR:
    print(str(b).zfill(6)+str(d).zfill(6))
# Judge status: Accepted
n=int(input())
num=list(map(int,input().split()))

cnt_m,cnt_z=0,0
for i in range(n):
  if num[i]<0:
    cnt_m+=1
  elif num[i]==0:
    cnt_z+=1

num1=[abs(i) for i in num]  

if cnt_m%2==0:
  ans=sum(num1)
else:
  if cnt_z>0:
    ans=sum(num1)
  else:
    ans=sum(num1)-2*min(num1)
    #print(7,sum(num1),min(num1))
print(ans)
# Judge status: Wrong Answer
n=int(input())
a=[input() for _ in range(n)]
b=sorted(a)
for i in range(n):
  if a[i]==b[0]:
    print(b[1])
  else:
    print(b[0])
# Judge status: Accepted
N, L = map(int, input().split())
apple_min = 1000
apple_sum = 0
ans = 0

for i in range(1, N + 1):
    if apple_min > abs(L + i - 1):
        apple_min = abs(L + i - 1)
        ans = L + i - 1 
    apple_sum += L + i - 1
    
print(apple_sum - ans)
# Judge status: Accepted
import math

H = int(input())
W = int(input())
N = int(input())

A = max(H,W)
print(math.ceil(N/A))
# Judge status: Wrong Answer
a,b=input().split()
a=int(a)
b=int(b)
c=[input().split() for i in range(a)]
d=1001
for i in range(a-1):
  if int(c[i][1])<=b:
    if d>int(c[i][0]):
      d=int(c[i][0])
if d==1001:
  print("TLE")
else:
  print(d)
# Judge status: Wrong Answer
#C - Walking Takahashi
X,K,D= map(int,input().split())

a = X // D
if a >= K :
    print(abs(abs(X) - abs(K*D)))
elif (K - a) % 2 == 0 :
    print(abs(abs(X) - abs(a*D)))
else:
    print(abs(abs(X) - abs(a * D)-abs(D)))
# Judge status: Accepted
N = int(input())
S = []
for i in range(N):
  S.append(input())
print(len(list(set(S))))
# Judge status: Accepted
A, B, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = min(A) + min(B)
for i in range(M):
  x, y, c = map(int, input().split())
  ans = min(ans, A[x-1] + B[y-1] - c)
print(ans)
# Judge status: Accepted
X = open(0).read().split()[0]
ans = 0
s_count = 0
for x in X:
    if x == 'T':
        if s_count == 0:
            ans += 1
        else:
            s_count -= 1
    else:
        s_count += 1
print(ans+s_count)
# Judge status: Accepted
s=0
N=int(input())
for i in range(1,N+1):
  if (len(str(i)))%2!=0:
    s+=1
print(s)
# Judge status: Accepted
import math

n=int(input())
cnt=0

for i in range(2,int(math.sqrt(n))+1):
  c=0
  while n%i==0:
    c+=1
    n//=i
  for j in range(1,c+1):
    c-=j
    if c<0:
      break
    cnt+=1
if n!=1:
  cnt+=1

print(cnt)
# Judge status: Wrong Answer
def main():
    S = input()
    i = 0
    ans = "keyence"
    for s in S:
        if s == ans[i]:
            i += 1
        if i == 7:
            break
    print("YES" if i == 7 else "NO")


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
cd = [list(map(int, input().split())) for _ in range(m)]
for i in range(n):
    seq_min = 1e8
    # seq_min = float('inf')
    ans = -1
    for j in range(m):
        seq = abs(ab[i][0] - cd[j][0]) + abs(ab[i][1] - cd[j][1])
        if seq_min > seq:
            seq_min = seq
            ans = j + 1
    print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-
"""
Created on Tue Sep  8 20:45:37 2020

@author: liang
"""

def gcc(a,b):
    if b == 0:
        return a
    return gcc(b, a%b)

A, B = map(int, input().split())
if A < B:
    A ,B = B, A
print(A*B//gcc(A,B))
# Judge status: Accepted
from fractions import gcd
def lcm(a, b):
    return a * b // gcd(a, b)

n = int(input())
t = [int(input()) for i in range(n)]

time = 1
for i in range(n):
    time = lcm(time, t[i])
print(time)
# Judge status: Accepted
n=int(input())
v=pow(10,9)+7
a=pow(10,n,v)-2*pow(9,n,v)+pow(8,n,v)
print (a%v)
# Judge status: Wrong Answer
S = input()
if S == "RRR":
  print(0)
elif S == "SSS":
  print(3)
elif S == "SSR" or S == "RSS":
  print(2)
else:
  print(1)
# Judge status: Accepted
import sys

A, B = map(int, input().split())
S = input()
l = ["0","1","2","3","4","5","6","7","8","9"]
if S[A] != "-":
    print("No")
    sys.exit()
for i in range(len(S)):
    if i == A:
        continue
    elif S[i] not in l:
        print("No")
        sys.exit()
print("Yes")
# Judge status: Wrong Answer
a = int(input())
b = [list(map(int, input().split())) for i in range(a)]
import math
count = 0
for i in range(a-1):
  for j in range(i+1,a):
    count += ((b[i][0]-b[j][0])*2+(b[i][1]-b[j][1])*2)*0.5
print(count/(a-1))
# Judge status: Wrong Answer
N = int(input())
count = 0
b = 0
for i in range (1,N+1,1):
    stri = str(i)
    rstri = stri[::-1]
    if i % 10 == 0 or int(rstri) > N:
        continue
    if stri[0] == rstri[-1] and stri != rstri:
        count += 1

    elif stri == rstri:

        for i in stri:
            if i != rstri[0]:
                b = 1
                break
        if b == 0:
            count += len(stri)**2 - (len(stri) - 1)**2
    b = 0
print(count)
# Judge status: Accepted
a, b = map(int, input().split())
c = b-a
print((c*(c+1)//2)-b)
# Judge status: Wrong Answer
import bisect
n = int(input())
X = sorted(list(map(int,input().split())))
Y = sorted(list(map(int,input().split())))
Z = sorted(list(map(int,input().split())))
print(sum(bisect.bisect_left(X,b) * (n-bisect.bisect_right(Z,b))) for b in Y)
# Judge status: Accepted
ls = [int(i) for i in input().split()]
ls.sort()
ans = ls[2] - ls[1] + (ls[1] - ls[0] )// 2
if ((ls[2] - ls[1]) - (ls[2] - ls[0])) % 2 == 0:
  print(ans)
else:
  print(ans+2)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

if (a + b + c) % 2 == 0:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
from math import ceil
n,k = map(int, input().split())
a = list(map(int, input().split()))

m = a.index(1)
print(ceil(m/(k-1)) + ceil((n-1-m)/(k-1)))
# Judge status: Wrong Answer
n=int(input())
l=[]
for i in range(n):
  s=str(input())
  if s not in l:
    l.append(s)
# Judge status: Wrong Answer
C = input()
c = ord(C)
print(chr(((c-96)+1)%26 + 96))
# Judge status: Accepted
S = list(map(int, input()))

odd = even = 0
for i in range(len(S)):
    if i % 2 + S[i] == 1:
        even += 1
    if i % 2 + S[i] != 1:
        odd += 1
print(min(odd, even))
# Judge status: Accepted
n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
l = []
okikae = []

for i in range(m):
  b,c = map(int,input().split())
  l.append([c,b])
  
l.sort(reverse = True)

for c,b in l:
  for j in range(b):
    if len(okikae) < len(a):
      okikae.append(c)
    else:
      break
  if len(okikae) == len(a):
    break
    
    
for i in range(len(okikae)):
  if okikae[i] > a[i]:
    a[i] = okikae[i]
  else:
    break
    
print(sum(a))
# Judge status: Accepted
s=input()
n=int(input())
rev=1
pre=''
suf=''

for i in range(n):
  q=input().split()
  if q[0]=='1':
    rev+=1
  elif (rev+int(q[1]))%2==0:
    pre=q[2]+pre
  else:
    suf=suf+q[2]
    
ans=pre+s+suf
  
if rev%2==0:
  print(ans[::-1])
else:
  print(ans)
# Judge status: Wrong Answer
n = int(input())
p = [list(map(int, input().split())) for _ in range(n)]
for i, v in enumerate(p):
    x, y = v
    p[i] = x-y, x+y

xm, ym = 0, 0
xw, yw = 10**9, 10**9
for x, y in p:
    xm = max(xm, x)
    xw = min(xw, x)
    ym = max(ym, y)
    yw = min(yw, y)

ans = max(abs(xm - xw), abs(ym - yw))
print(ans)
# Judge status: Accepted
N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
BC = [list(map(int,input().split())) for _ in range(M)]
BC.sort(key=lambda x: x[1], reverse=True)
j = 0
for i in range(N):
    if A[i] >= BC[j][1]:
        break
    else:
        A[i] = BC[j][1]
        BC[j][0] -= 1
        if BC[j][0] == 0:
            j += 1
        if j >= M:
            break
print(sum(A))
# Judge status: Accepted
D = {}
s, t = input().split()
a, b = map(int, input().split())
D[s] = a
D[t] = b
D[input()] -= 1
print(D[s], D[t])
# Judge status: Wrong Answer
num1 = 100
num2 = 100
print(num1*num2)