peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import sys
S = input()
T = input()
match_list = []
for i in range(len(S)-len(T)+1):
    is_match = True
    for j in range(len(T)):
        if S[i+j] != T[j] and S[i+j] != '?':
            is_match = False
            break
    if is_match:
        match_list.append(i)
if not match_list:
    print("UNRESTORABLE")
    sys.exit()
ans = S[:max(match_list)] + T
if len(S) > len(ans):
    ans += S[len(ans):]
print(ans.replace('?', 'a'))
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))

A.sort(reverse=True)

ans = 0
for i, a in enumerate(A):
    flag = True
    for j in A[i + 1:]:
        if a % j == 0:
            flag = False
            break

    if A[i] == A[i - 1]:
        if A[i] % A[i - 1] == 0:
            flag = False

    if flag:
        ans += 1

print(ans)
# Judge status: Accepted
X = input()
if X in "753":
  print("YES")
else:
    print("NO")
# Judge status: Accepted
if str(input()).isupper():
  print('A')
else:
  print('a')
# Judge status: Accepted
import sys
import bisect
n = int(input())
a_ls = [int(i) for i in sys.stdin.readline().split()]
ls = [i * 400 - 1 for i in range(1, 9)]
_set = set()
n_max = 0
for a in a_ls:
    ind = bisect.bisect_left(ls ,a)
    if ind == 8:
        n_max += 1
    else:
        _set.add(ind)
_min = max(len(_set), 1)
print(_min, len(_set) + n_max)
# Judge status: Wrong Answer
w, a, b = map(int, input().split())

if b + w > w + a > b:
    print(0)
elif a + w < b:
    print(b - a - w)
elif b + w < a:
    print(a - b - w)
# Judge status: Accepted
list = input().split()
list.sort()
if ''.join(list) == '557':
  print('YES')
else:
  print('NO')
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
max_a = max(A) + 1
counter = [0 for _ in range(max_a)]

for i in A:
    for j in range(i, max_a, i):
        counter[j] += 1

res = 0

for a in A:
    if counter[a] == 1:
        res += 1

print(res)
# Judge status: Accepted
def main():
    S = input()
    N = len(S)
    for i in range(1, N+1):
        t = S[:-i]
        if len(t) % 2 == 1:
            continue
        M = len(t)
        if t[:M//2] == t[M//2:]:
            return print(M)


if __name__ == '__main__':
    main()
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=[-1,0]
i=0
while i<=n-1:
    res=0
    cnt=0
    while i+res<=n-1 and a[i+res]-a[i]<=2:
        if a[i+res]==a[i]:
            cnt+=1
        res+=1
    if res>ans[1]:
        ans[1]=res
        ans[0]=i
    i+=cnt
print(ans[1])
# Judge status: Accepted
C=input()

print(chr(ord(C)+1))
# Judge status: Accepted
#!/usr/bin/env python3
def func(a, i):
    return {a[0]:i, a[1]:i+1, a[2]:i+2}
A = {}
for i in range(3):
    A.update(func(input().split(), 3*i))
N = int(input())
b = [A.get(input(), -1) for _ in range(N)]
bingo = [[0, 1, 2], [3, 4, 5], [6, 7, 8],
         [0, 3, 6], [1, 4, 7], [2, 5, 8],
         [0, 4, 8], [2, 4, 6]]
for i in bingo:
    if set(i) <= set(b):
        print("Yes")
        break
else:
    print("No")
# Judge status: Wrong Answer
sdash = input()
n = len(sdash)
t = input()
s = ['*'] * n
isNotUsed = True

for i in range(len(t), n+1):
    if sdash[-i] == t[0] and isNotUsed:
        for j in range(len(t)):
            s[-i+j] = t[j]
        isNotUsed = False
    elif sdash[-i] == '?':
        s[-i] = 'a'
    else:
        s[-i] = sdash[-i]
if isNotUsed:
    print('UNRESTORABLE')
else:
    s = ''.join(s)
    s.replace('*', 'a')
    print(s)
# Judge status: Accepted
n = int(input())
s = list(input())
ans = ''
cnt = 0
for c in s:
    ans += c
    if c == ')':
        cnt -= 1
    else:
        cnt += 1
    if cnt < 0:
        ans = '(' + ans
        cnt = 0

cnt = 0
for c in s[::-1]:
    if c == ')':
        cnt += 1
    else:
        cnt -= 1
    if cnt < 0:
        ans += ')'
        cnt = 0

print(ans)
# Judge status: Wrong Answer
import itertools
n,m,q=map(int, input().split())
arr=[[0]*4 for i in range(q)]

for i in range(q):
    arr[i][0],arr[i][1],arr[i][2],arr[i][3]=map(int, input().split())

ans=0
for i in itertools.product([k for k in range(1,m+1)],repeat=n):
    score=0
    for j in range(q):
        tmp1=i[arr[j][1]-1]
        tmp0=i[arr[j][0]-1]
        if tmp1-tmp0==arr[j][2]:
            score+=arr[j][3]
    if ans<score:
        ans=score
print(ans)
# Judge status: Accepted
n,a,b=map(int,input().split())
m=n%(a+b)
s=n//(a+b)
if m<=a:
    print(a*s+m)
else:
    print(a*s+a)
# Judge status: Accepted
s = input()

cnt = {}

for l in s :
    cnt.setdefault(l,0)
    cnt[l] += 1


flag = True
for v in cnt.values():
    if v % 2 == 1:
        flag = False
        break
        
if flag :
    print('Yes')
else :
    print('No')
# Judge status: Wrong Answer
import sys
input=sys.stdin.readline
n=int(input())
L=list(map(int,input().split()))
L.sort()
num=L[n//2]-L[n//2-1]
print(num if num!=1 else 0)
# Judge status: Wrong Answer
n=int(input())
A=list(map(int,input().split()))
goukei=sum(A)
for i in range(1,n):
    A[i]+=A[i-1]
ans=100000000000
for j in range(n):
    ans=min(ans,abs(A[j]-(goukei-A[j])))
print(ans)
# Judge status: Wrong Answer

n,x = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
b = []
num = a[0]
i = 1

while num <= x:
    num += a[i]
    if x - a[i] > 0:
        x -= a[i]
        b.append(a[i])
        i += 1
    else:
        b.append(max(0,a[i]))
        break

print(a)
print(b)
print(num)

ans = 0
for i in range(min(len(a),len(b))):
    if a[i] == b[i]:
        ans += 1
print(ans)
# Judge status: Accepted
A, B, H, M = map(int, input().split())

import math

sita = min(abs(30*H-11*M/2), 360-abs(30*H-11*M/2))

# print(sita)

# print(math.cos(math.radians(sita)))

print((A**2 + B**2 - 2*A*B*math.cos(math.radians(sita)))**(1/2))
# Judge status: Wrong Answer
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


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


if __name__ == '__main__':
    a,b,k = map(int, input().split())
    
    count = 0
    for i in range(1,101):
        if a % i ==0 and b % i ==0:
            count +=1
        
        if count == k:
            print(i)
            break
# Judge status: Wrong Answer
sx, sy, gx, gy = map(int, input().split())

print("U"*(gy-sy)+"R"*(gx-sx)+"D"*(gy-sy)+"L"*(gx-sx)+"L"+"U"*(gy-sy+1)+"R"*(gx-sx+1)+"D"+"R"+"D"*(gy-sy+1)+"L"*(gx-sx+1)+"D")
# Judge status: Wrong Answer
N = int(input())
a = list(map(int, input().split()))

dp = [[0] * 2 for _ in range(N+1)]
dp[0][0] = 0
dp[0][1] = -10**18

for i in range(1, N):
    dp[i][0] = max(dp[i-1][0]+a[i-1], dp[i-1][1]-a[i-1])
    dp[i][1] = max(dp[i-1][0]-a[i-1], dp[i-1][1]+a[i-1])
print(max(dp[N-1][0], dp[N-1][0]))
# Judge status: Accepted
a, b = list(map(int, input().split()))

d = b - a

print(d * (d+1) // 2 - b)
# Judge status: Accepted
n = int(input())
dp = [i for i in range(n+1)]  # dp table 最初は全て1円で払う
for j in range(1, n+1):
    power = 1
    while power <= j:
        dp[j] = min(dp[j], dp[j - power] + 1)
        power *= 6
    power = 1
    while power <= j:
        dp[j] = min(dp[j], dp[j - power] + 1)
        power *= 9
print(dp[n])
# Judge status: Accepted
import math
n = int(input())
print(2**int(math.log2(n)))
# Judge status: Wrong Answer
S = input()
T = input()
dictionary = {}
ans = "Yes"
for i in range(len(S)):
    if T[i] in dictionary:
        if dictionary[T[i]] == S[i]:
            continue
        else:
            ans = "No"
    else:
        dictionary[T[i]] = S[i]

print(ans)
# Judge status: Accepted
S = input()
K = int(input())
Ans = []
for s in S[:-1]:
    if s == 'a':
        Ans.append('a')
        continue
    if (123 - ord(s)) <= K:
        Ans.append('a')
        K -= 123 - ord(s)
    else:
        Ans.append(s)

K %= 26
if ord(S[-1]) + K >= 123:
    Ans.append(chr(ord(S[-1]) + K - 26))
else:
    Ans.append(chr(ord(S[-1]) + K))


print(''.join(Ans))
# Judge status: Accepted
#!/usr/bin/env python3
n = int(input())
t,a = map(int,input().split())
h = list(map(int,input().split()))
best = 10**6
ans = 0
for i in range(n):
    if best > abs((t-h[i]*0.006)-a):
        best = abs((t-h[i]*0.006)-a)
        ans = i+1
print(ans)
# Judge status: Accepted
#B
H,N=map(int,input().split())
A=list(map(int,input().split()))

if sum(A)>=H:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
import numpy as np
sub = input()
input = input().split(" ")
nl = list()
for ele in input:
  nl.append(int(ele))
res = np.prod(nl)
if res >= 1000000000000000000:
  print("-1")
else:
  print(res)
# Judge status: Wrong Answer
N=int(input())
if N%2==0:
    print(1/2)
elif N==1:
    print(1.0000000000)
else:
     print(0.6000000000)
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    K, X = input_nums()
    a = [x for x in range(K*2-1)]
    m = a[len(a)//2]
    d = m - X
    print(*[x - d for x in a])

if __name__ == '__main__':
    main()
# Judge status: Accepted
n,l = map(int,input().split())
A =[input() for _ in range(n)]
print("".join(sorted(A)))
# Judge status: Wrong Answer
N = int(input())
args = list(map(int, input().split()))

c = 0
for arg in args:
    cc =int(arg / 2)
    if cc > c:
        c = cc
print(c)
# Judge status: Accepted
s = input()
q = int(input())
appendix = [[], []]
reverse = False
for _ in range(q):
  query = input().split()
  if query[0] == '1':
    reverse ^= True
  else:
    f = bool(int(query[1]) - 1)
    appendix[int(f ^ reverse)].append(query[2])
if reverse:
  print(''.join(appendix[1][::-1]) + s[::-1] + ''.join(appendix[0]))
else:
  print(''.join(appendix[0][::-1]) + s + ''.join(appendix[1]))
# Judge status: Wrong Answer
N, A = [int(input()) for i in range(2)]
if (N%500) < A:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
w,h,x,y = map(int,input().split())
men1 = min(h*x,h*(w-x))
men2 = min(w*y,w*(h-y))

print("{} {}".format(float(max(men1,men2)),1 if men1 == men2 else 0))
# Judge status: Accepted
N, K = map(int, input().split())
S = list(input())

S[K - 1] = chr(ord(S[K - 1]) + 32)

print("".join(S))
# Judge status: Accepted
s = int(input())
n = 1000000000
x = (n-s%n)%n
y = (s+x)//n
print(*[1,n,y,x,0,0])
# Judge status: Accepted
N, K = map(int, input().split())
h = [0] + list(map(int, input().split()))
dp = [10**10] * (N+1)
dp[0] = dp[1] = 0
for i in range(1, N+1):
    for k in range(1, K+1):
        if i + k <= N:
            dp[i+k] = min(dp[i+k], dp[i]+abs(h[i] - h[i+k]))
print(dp[N])
# Judge status: Accepted
N,D=map(int,input().split())
X=[tuple(map(int,input().split())) for i in range(N)]

print(sum([1 for x,y in X if (x**2+y**2)**0.5<=D]))
# Judge status: Accepted
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    s, t = map(str, input().decode().split())
    print(t, s, sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()
# Judge status: Accepted
import sys
n=int(input())
A=list(map(int,input().split()))
count=0
for elem in A:
    if elem < 0:
        count+=1
if count%2==0:
    for i in range(len(A)):
        A[i]=abs(A[i])
    print(sum(A))
    sys.exit()
else:
    tmp=1000000000000
    for elem in A:
        tmp=(min(tmp,abs(elem)))
    for i in range(len(A)):
        A[i]=abs(A[i])
    print(sum(A)-2*tmp)
# Judge status: Accepted
from math import gcd

K = int(input())
#K = 200
sum = 0

for a in range (1, K+1):
  for b in range(1, K+1):
    for c in range(1, K+1):
      sum += gcd(gcd(a, b), c)

print(sum)
# Judge status: Accepted
print('A{}C'.format(input().split()[1][0]))
# Judge status: Accepted
n,k=map(int,input().split())
l=[0]*(10**5+1)
for i in range(n):
    a,b=map(int,input().split())
    l[a]+=b
inc=0
for i in range(10**5+1):
    inc+=l[i]
    if inc>=k:
        print(i)
        break
# Judge status: Accepted
from heapq import (
    heapify,  # 優先度付きキューの生成
    heappop,
    heappush,
    heappushpop,
    heapreplace
    )

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

# 最小値が返ってくるので-1倍する
A = [-i for i in map(int,input().split())]
heapify(A)

for _ in range(M):
    s = -heappop(A)
    s //= 2
    heappush(A, -s)

print(-sum(A))
# Judge status: Accepted
n, k = map(int, input().split())
i = 0
while (n >= k):
    n = n / k
    i = i + 1
if (n != 0):
    i = i + 1    
print(i)
# Judge status: Accepted
import math

a, b, x = map(int, input().split())
s = a*a*b

if x*2 <= s:
    tan = (a * b * b) / (2 * x)
else:
    tan = (2 * (a * a * b - x)) / (a * a * a)

sita = math.degrees(math.atan(tan))
print(sita)
# Judge status: Wrong Answer
n,k = [int(ch) for ch in input().split()]
snuckList = []
for i in range(n):
    snuckList.append(i+1)
for i in range(k):
    snuck = int(input())
    snackList = input()
    if snuck in snuckList:
        snuckList.remove(snuck)
print(len(snuckList))
# Judge status: Wrong Answer
a, b = map(int, input().split())
if (a % 3 == 0) or (b % 3 == 0) or ((a + b) % 3 == 0):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
s=list(input())
t=list(set(s))
print("yes" if len(s)==len(t) else "no")
# Judge status: Accepted
X = int(input())
for k in range(1, 361):
  if k * X % 360 == 0:
    print(k)
    break
# Judge status: Wrong Answer
a, b = map(int, input().split())
r = a-1
if b-a>0:
    r+=1
print(r)
# Judge status: Accepted
def tax(a, b):
    for i in range(1,1010):
        if int(i*0.08) == a and int(i*0.1) == b:
            print(i)
            return
    print(-1)
    return

a, b = map(int, input().strip().split())
tax(a,b)
# Judge status: Accepted
# ABC063
from collections import Counter

S = input()
count = Counter(S)

for cnt in count.values():
    if cnt != 1:
        print('no')
        exit()
else:
    print('yes')
# Judge status: Accepted
x = int(input())

if 400 <= x < 600:
    a = 8
elif 600 <= x < 800:
    a = 7
elif 800 <= x < 1000:
    a = 6
elif 1000 <= x < 1200:
    a = 5
elif 1200 <= x < 1400:
    a = 4
elif 1400 <= x < 1600:
    a = 3
elif 1600 <= x < 1800:
    a = 2
else:
    a = 1
print(a)
# Judge status: Accepted
S=list(input())

for i in range(10):
    try:
        j=S.index('B')
    except:
        break
    if j!=0:
        del S[j-1:j+1]
    else:
        del S[j]
print(''.join(S))
# Judge status: Accepted
n,k = map(int, raw_input().split())
s = raw_input()
cd = 0
d = None
for l in s:
	if d != l:
		cd +=1
		d = l
score = 0
for u,v in zip(s,s[1:]):
	if u == v:
		score +=1

if cd > 2:
	t = min(k,((cd - 2)+1)/2)
	k -= t
	score += 2 * t 
	cd -= 2 * t
if cd == 2 and k:
	score +=1
	cd -= 1
print score
# Judge status: Accepted
# coding: utf-8
import math


def prime(X):
    if X == 1:
        return False
    
    for i in range(2, int(math.sqrt(X)) + 1):
        if X % i == 0:
            return False
    return True


X = int(input())
while prime(X) == False:
    X += 1
print(X)
# Judge status: Wrong Answer
n,m=map(int,input().split())
ans=[-1]*n
frag=1
for i in range(m):
  s,c=map(int,input().split())
  s-=1
  if ans[s]==-1:
    ans[s]=c
  elif ans[s]!=c:
    frag=0
if ans[0]==0:
  frag=0
elif ans[0]==-1:
  ans[0]=1
for i in range(1,n):
  if ans[i]==-1:
    ans[i]=0
if frag:
  print(int(''.join(map(str,ans))))
else:
  print(-1)
# Judge status: Accepted
N,M = map(int,input().split())
a = [input() for _ in range(N)]
b = [input() for _ in range(M)]

for i in range(N-M+1):
    for j in range(N-M+1):
        result = True
        for k in range(M):
            for l in range(M):
                if b[k][l] != a[i+k][j+l]:
                    result = False
        if result:
            print('Yes')
            exit()
print('No')
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
abs_min = 10 ** 9
minus = 0
total = 0
for x in A:
    if x < 0:
        minus += 1
        x = - x
    if abs_min > x:
        abs_min = x
    total += x
if minus % 2 == 0:
    print(total)
else:
    print(total - abs_min * 2)
# Judge status: Accepted
N, K = map(int, input().split())
print(min(N % K,abs(N % K-K)))
# Judge status: Accepted
n, m = map(int, input().split())
c = {tuple(map(int, input().split())) for _ in [None]*m}
for i in range(2, n):
    if {(1, i), (i, n)} <= c:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")
# Judge status: Accepted
n = input()
a = 0
b = 2
for s in n:
  v = int(s)
  a_ = min(a + v, b + v)
  b_ = min(a + 10 - v + 1, b + 10 - v + 1 - 2)
  a = a_
  b = b_
  
print(min(a, b))
# Judge status: Accepted
X,Y=map(int,input().split())
if(X%Y==0):
    print(-1)
    exit()
print(X)
# Judge status: Accepted
a, b, x = map(lambda x: int(x), input().split())

t = x - a
if t < 0:
  print('NO')
else:
  if t < b:
    print('YES')
  else:
    print('NO')
# Judge status: Accepted
P,Q,R=map(int,input().split())
print(min(P+Q,Q+R,R+P))
# Judge status: Accepted
#!/usr/bin/env python3
from itertools import product, permutations, combinations
from bisect import bisect_right,bisect_left

N=int(input())
times = [list(map(int, input().split())) for i in range(N-1)]
for start in range(N-1):
    current = start + 1
    elapsed =  times[start][1] + times[start][0]
    while current < N-1:
        if elapsed < times[current][1]:
            elapsed = times[current][1]
        if elapsed % times[current][2] != 0:
            elapsed = times[current][2] * (elapsed // times[current][2] + 1)
        elapsed += times[current][0] 
        current += 1
    print(elapsed)
print(0)
# Judge status: Accepted
a,b,c,d = map(int,input().split())
while a > 0 and c > 0:
  c -= b
  a -= d
if c <= 0:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n = int(input())

if n >= 195:
  print(5)
elif n >= 189:
  print(4)
elif n >= 165:
  print(3)
elif n >= 135:
  print(2)
elif n >= 105:
  print(1)
else:
  print(0)
# Judge status: Accepted
n=int(input())
s=input()
s_l=len(s)

ans=0
for i in range(s_l):
  set1=set(s[:i])
  set2=set(s[i:])
  t_ans=len(set1&set2)
  ans=max(ans,t_ans)
print(ans)
# Judge status: Accepted
N = int(input())
L = list(map(int,input().split()))

L_max = max(L)
L.remove(L_max)

print('Yes') if L_max < sum(L) else print('No')
# Judge status: Accepted
from collections import defaultdict
from itertools import count


def prime_factors(n):
  counter = defaultdict(int)  
  for i in count(2):
    if i * i > n:
      break
    while n % i == 0:
      n //= i
      counter[i] += 1
  if n != 1:
    counter[n] = 1
  return counter


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

a = prime_factors(A)
b = prime_factors(B)

print(len({k for k in a} & {k for k in b}) + 1)
# Judge status: Accepted
n = int(input())
s = [input() for _ in range(n)]
d = dict()
for st in s:
    if st not in d:
        d[st] = 1
    else:
        d[st] += 1
m = max(d.values())
ans = set()
for k, v in d.items():
    if v == m:
        ans.add(k)
ans = sorted(ans)
for st in ans:
    print(st)
# Judge status: Accepted
N = int(input())
count = 0
flag = False

for i in range(26):
  for j in range(15):
    if i * 4 + j * 7 == N:
      flag = True
      break

if flag:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N, M = list(map(int, input().split()))

count = 0
if N >= M:
    count += M//2
elif N*2 <= M:
    count += N
    M = M - N*2
    count += M//4

print(count)
# Judge status: Accepted
N = int(input())
count = 0
for i in range(N):
    if (i+1) % 3 != 0 and (i+1) % 5 != 0:
        count += i+1
print(count)
# Judge status: Wrong Answer
import bisect
n = int(input())
X = sorted(list(map(int,input().split())), reverse=True)
Y = sorted(list(map(int,input().split())), reverse=True)
Z = sorted(list(map(int,input().split())), reverse=True)
print(sum(bisect.bisect_right(x,y[b]) * (n-bisect.bisect_left(z,y[b]))) for y in Y)
# Judge status: Wrong Answer
from collections import Counter

s = input()

c = Counter(s)

print("YES" if sum([x % 2 == 1 for x in list(c.values())]) <= 1 else "NO")
# Judge status: Accepted
x,y = map(int, input().split())

ans = abs(abs(x)-abs(y))
if x > y and abs(x) != abs(y) and x*y > 0:
	ans+=2
elif x*y < 0 or (x>y and x==0) or (x>y and y==0):
	ans+=1

print(ans)
# Judge status: Accepted
n, t = map(int, input().split())
c = 10000
for i in range(n):
    tmp = input().split()
    if t >= int(tmp[1]):
        if int(tmp[0]) < c:
            c = int(tmp[0])
if c == 10000:
    print('TLE')
    exit()
else:
    print(c)
# Judge status: Wrong Answer
N = int(input())
power = 1
for i in range(N):
    power = power*(i+1)
    power % (10**9 + 7)
print(power)
# Judge status: Accepted
n=int(input())
p=list(map(int,input().split()))
ok=True
for i in range(1,n):
  if p[i]-p[i-1]>0:
    continue
  ok=False
if ok:
  print("YES")
  exit(0)

for i in range(n):
  for j in range(n):
    if i==j:continue
    t=p[:]
    taihi=t[i]
    t[i]=t[j]
    t[j]=taihi
    ok=True
    for k in range(1,n):
      if t[k]-t[k-1]>0:
        continue
      ok=False
    if ok:
      print("YES")
      exit(0)
print("NO")
# Judge status: Wrong Answer
S = input()
checker = '0'
ans = 0
for i in range(len(S)):
  if checker != S[i]:
    ans+=1
  if i%2==0:
    checker = '0'
  else:
    checher = '1'
tmp = ans
ans = 0
checker = '1'
for i in range(len(S)):
  if checker != S[i]:
    ans+=1
  if i%2==0:
    checker = '1'
  else:
    checher = '0'
print(min(ans,tmp))
# Judge status: Accepted
n, m = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
if m <= n:
    print(0)
    exit()

x = sorted(x)
diffs = []
for i in range(m - 1):
    diffs.append(x[i + 1] - x[i] - 1)
diffs = sorted(diffs, reverse=True)
print(x[-1] - x[0] + 1 - sum(diffs[: n - 1]) - n)
# Judge status: Accepted
n,k,q = map(int,input().split())
player = []
for i in range(n):
    player.append(0)
for i in range(q):
    player[int(input())-1] += 1
for i in range(n):
    if player[i] > q-k:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
a,b,c = input().split()

a = int(a)
b = int(b)
c = int(c)

if 1 <= a <= 100:
    if 1 <= b <= 100:
        if 1<= c <= 100:

            x = b / a
            if x >= c:
                print(int(c))
            else:
                print(int(x))
# Judge status: Wrong Answer
K, A, B = map(int, input().split())
if B - A <= 2 :
  print(K + 1)
elif K < A + 1:
  print(K + 1)
elif K == A + 1:
  print(B)
else :
  count = K - (A + 1)
  if count % 2 == 1:
    ans = (count // 2 + 1) * B 
  else:
    ans = (count//2 + 1) * B + 1
  print(ans)
# Judge status: Accepted
import numpy as np 
from numba import njit
n,k=map(int,input().split())
a=list(map(int,input().split()))
a=np.array(a,np.int64)

@njit('(i8[::1],)', cache=True)
def imo(a):
    imos=np.zeros(n+1,np.int64)
    for i in range(n):
        imos[max(0,i-a[i])]+=1
        imos[min(n,i+a[i]+1)]-=1
    
    immo=np.zeros(n+1,np.int64)
    immo=np.cumsum(imos)
    return immo[:n]


for _ in range(min(k,41)):
    a=imo(a)
    
print(*a)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
res = b[-1]
for i in range(n - 1):
    res += b[i]
    if a[i] + 1 == a[i + 1]:
        res += c[a[i] - 1]
print(res)
# Judge status: Accepted
from collections import defaultdict
N, M = map(int, input().split())
order = []
dd = defaultdict(int)

for i in range(M):
    p, y = map(int, input().split())
    order.append([i, p, y])

# 全体を年代順にソート
order.sort(key=lambda x: (x[2]))

res = defaultdict(str)
for i, pp, yy in order:
    dd[pp] += 1
    res[i] = str(pp).zfill(6) + str(dd[pp]).zfill(6)

for i in range(M):
    print(res[i])
# Judge status: Accepted
import math
N = int(input())
S = [int(input()) for _ in range(5)]

print(math.ceil(N/min(S))+4)
# Judge status: Accepted
N,M=map(int,input().split())
if N==M+1:
    A=N
    B=M
    ans=1
elif N+1==M:
    A=M
    B=N
    ans=1
elif N==M:
    A=N
    B=M
    ans=2
else:
    print(0)
    exit()
ansa=1
ansb=1
for i in range(1,A+1):
    ansa=(ansa*i)%(10**9+7)
for j in range(1,B+1):
    ansb=(ansb*j)%(10**9+7)

print((ansa*ansb*ans)%(10**9+7))
# Judge status: Accepted
# coding:utf-8
import itertools
import math


def distance(t1, t2):
    return(math.hypot(t1[0] - t2[0], t1[1] - t2[1]))


def main():

    n = int(input())
    town = (tuple(map(int, input().split())) for _ in range(n))
    ans = 0

    for item in itertools.permutations(town, r=2):
        # print(*item)
        ans += distance(*item)

    print(ans / n)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
a,b,t=map(float,input().split())
print(b*(t//a))