peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
import numpy as np

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

res = np.cumprod(risu[0: K])[K - 1]

for i in range(K + 1, N +1):
    if np.cumprod(risu[i - K: i])[K - 1] > res:
        print('Yes')
    else:
        print('No')
    res = np.cumprod(risu[i - K: i])[K - 1]
# Judge status: Wrong Answer
n, k = list(map(int, input().split()))
if k == 1:
  print(0)
else:
  print( abs( (n%k) -1 ) )
# Judge status: Wrong Answer
def sum_nine(a: int):
    a = sum(map(int, str(a)))
    if a % 9 == 0:
        print("Yes")
    else:
        print(False)
# Judge status: Accepted

n = input()
 
res = []
 
for char in n:
    if char == '0':
        res.append(char)
    elif char == '1':
        res.append(char)
    elif char == 'B':
        if len(res) > 0:
            res.pop()
 
print(''.join(res))
# Judge status: Accepted
r,g,b = map(int, input().split())
k = int(input())

a = 0
while r>=g:
  g *= 2
  a += 1

while g>=b:
  b *= 2
  a += 1

if a<=k:
  print("Yes")
else:
  print("No")

# print(r,g,b,a)
# Judge status: Accepted
n = int(input())
a = [list(map(int,input().split())) for _ in range(2)]
print(max(sum(a[0][:i+1] + a[1][i:]) for i in range(n)))
# Judge status: Wrong Answer
N=int(input())
inf=100000
dp=[inf for _ in range(N+1)]
dp[0]=0
dp[1]=1
for n in range(N+1):
    num=100000
    i=0
    j=0
    while n>9**i:
        i+=1
    while n>6**j:
        j+=1
    for k in range(i):
        num=min(num,dp[n-9**k]+1)
    for k in range(j):
        num=min(num,dp[n-6**k]+1)
    num=min(num,dp[n-1]+1)
    dp[n]=min(dp[n],num)
print(dp[N])
# Judge status: Accepted
N = int(input())
H = list(map(int,input().split()))
cnt = 0
ans = 0
for i in range(N-1):
    if H[i] >= H[i+1]:
        cnt += 1
    ans = max(ans, cnt)
    if H[i] < H[i+1]: 
        cnt = 0
print(ans)
# Judge status: Wrong Answer
n = int(input())
h_L = list(map(int,input().split()))

#dp = [float("inf")] * (10**4 + 1)
dp = [10**8] * n

dp[0] = 0
dp[1] = abs(h_L[0]-h_L[1])

for i in range(2,n):
    #dp[i]
    # 1
    tmp1 = dp[i-1] + abs(h_L[i-1] - h_L[i])
    dp[i] = min(dp[i],tmp1)
    # 2
    tmp2 = dp[i-2] + abs(h_L[i-2] - h_L[i])
    dp[i] = min(dp[i],tmp2)
#print(dp)
print(dp[n-1])
# Judge status: Accepted
from string import ascii_lowercase

n = int(input())

def f(l):
    if len(l)==n:
        print("".join([ascii_lowercase[i] for i in l]))
        return
    
    for i in range(max(l)+2):
        f(l+[i])

f([0])
# Judge status: Accepted
import math
MOD = 1000000007
m,n=map(int,input().split())
f=abs(m-n)
if f == 0:
  ans=2*math.factorial(m)*math.factorial(n)%MOD
  print(ans)
  exit()
elif f == 1:
  ans=math.factorial(m)*math.factorial(n)%MOD
  print(ans)
  exit()
else:
  print(0)
  exit()
# Judge status: Wrong Answer
s=input()
if s.join(sorted(s))=='abc':
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
t = input()
if t[-1]=='P' or t[-1]=='D': ans = t[-1]
else:ans = 'D'
for i in t[len(t)-2::-1]:
    if i=='P' or i=='D':
        ans += i
    else:
        if ans[-1]=='P':
            ans += 'D'
        else:
            ans += 'P'
print(ans[::-1])
# Judge status: Wrong Answer
A, B = map(int, input().split())
if A < 13:
    if A >= 6:
        print(B/2)
    else:
        print(0)
else:
    print(B)
# Judge status: Wrong Answer
n = int(input())
s = [input() for _ in range(n)]

import collections
li = []
li2 = []
for i in range(n):
    cou = collections.Counter(list(s[i]))
    if cou in li:
        li2 += [str(cou)[8:-1]] 
    li += [cou]

li3 = collections.Counter(li2)
li4 = list(li3.values())
ans = 0

for i in li4:
    ans += (i+1)*i//2

print(ans)
# Judge status: Accepted
s = input()

if s.count('a') and s.count('b') and s.count('c'):
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
l=["MON","TUE","WED","THU","FRI","SAT","SUN"]
S=input()
print(6-l.index(S))
# Judge status: Wrong Answer
import re 
T=input() 



T=T.replace("???", "DDD")
T=T.replace("??", "DD")

T=T.replace('D?D', 'DPD')
T=T.replace('D?P', 'DDP')
T=T.replace('P?D', 'PDD')
T=T.replace('P?P', 'PDP')

T=T.replace('?P', 'DP')
T=T.replace('?D', 'PD')

T=T.replace('P?', 'PD')
T=T.replace('D?', 'DD')

T=T.replace('?', 'D')
# Judge status: Wrong Answer
n = int(input())
p = list(map(int,input().split()))
p = [ x for x in set(p) if p.count(x) == 1]
p.sort()
tp = [ 1 for _ in range(len(p))]
for i in range(len(p)):
    if tp[i]:
        for j in range(i+1,len(p)):
            if p[j]:
                if p[j] % p[i] == 0:
                    tp[j] = 0
print(sum(tp))
# Judge status: Accepted
from collections import Counter
n = int(input())
A = sorted(map(int, input().split()))

c = Counter(A)

yes_or_no = [True for i in range(A[n-1]+1)]

for a in A:
  t = a*2
  while t <= A[n-1]:
    yes_or_no[t] = False
    t += a
ans = 0
for a in A:
  if c[a] == 1 and yes_or_no[a] == True:
    ans += 1
print(ans)
# Judge status: Accepted
N=int(input())
A=[]
for _ in range(N):
    A.append(int(input()))
B=sorted(A,reverse=True)
for i in range(N):
    if A[i]!=B[0]:
        print(B[0])
    else:
        print(B[1])
# Judge status: Accepted
X,N=map(int,input().split())
if N==0:
    input()
    print(X)
    exit(0)
xn=list(map(int,input().split()))

a=[(abs(x-X),x) for x in xn]

for d in range(0, 100):
    a1=d+X
    a2=-d+X
    if a2 not in xn:
        print(a2)
        exit(0)
    elif a1 not in xn:
        print(a1)
        exit(0)
# Judge status: Accepted
n, a, b = map(int, input().split())
if n==1:
    if a==b:
            ans = 1
    else:
        ans = 0
else:
    if a>b:
        ans = 0
    else:
        ans = ((n-2)*b-(n-2)*a)+1
print(ans)
# Judge status: Wrong Answer
k = int(input())
if(k%2==0):
  print("-1")
else:
  i = 1
  while True:
    m = 7
    if(m%k==0):
      print(i)
      break
    if(i>10000000):
      print("-1")
      break
    m = m*10 + 7
    i += 1
# Judge status: Accepted
n,k = map(int,input().split())
cnt = 0
while True:
    if n < k and n%k == 0:
        break
    cnt += 1
    n //= k
print(cnt)
# Judge status: Wrong Answer
import numpy as np
N = int(input())
h_list = []
for i in range(N):
    h_list.append([i for i in map(int,input().split())])

print(h_list)

dp = np.zeros((N,3))
dp[0] = h_list[0]
for i in range(1,N):
    dp[i,0] = max(dp[i-1,1], dp[i-1,2]) + h_list[i][0]
    dp[i,1] = max(dp[i-1,0], dp[i-1,2]) + h_list[i][1]
    dp[i,2] = max(dp[i-1,0], dp[i-1,1]) + h_list[i][2]

print(max(dp[-1]))
# Judge status: Accepted
import itertools
N = int(input())
L = list(map(int,input().split()))
count=0
p_list=list(itertools.combinations(range(N),3))
for i in p_list:
    if((L[i[0]]!=L[i[1]]) and (L[i[2]]!=L[i[1]]) and (L[i[0]]!=L[i[2]]) ):
        if((L[i[0]]+L[i[1]]> L[i[2]]) and (L[i[1]]+L[i[2]]> L[i[0]]) and (L[i[0]]+L[i[2]]> L[i[1]])):
            count+=1
print(count)
# Judge status: Wrong Answer
def Step():
    
    num = int(input())

    data = list(map(int,input().split()))
        
    print(max(data) - min(data))
        
if __name__ == '__main__':
    Step()
# Judge status: Wrong Answer
n = int(input())
b = 26
ans = []
for i in range(1,99):
    if n <= b:
        n -= 1
        for j in range(i-1):
            ans.append(chr(97 + n % b))
            n //= b
        break
    else:
        n -= b ** i

for k in range(len(ans)):
    print(ans[-(k+1)],end="")
# Judge status: Accepted
idx = lambda x: x-1
n = int(input())
a = list(map(int, input().split()))
b = [0]*n
for i in reversed(range(1, n+1)):
    cnt = 0
    for j in range(i*2, n+1, i):
        cnt += b[idx(j)]
    if cnt % 2 == a[idx(i)]: continue
    b[idx(i)] += 1
s = sum(b)
if s == 0:
    print(0)
    exit()
print(s)
for i in range(1, n+1):
    if b[idx(i)]: print(i)
# Judge status: Wrong Answer
a=int(input())
hahaha=0
for i in range(a):
    r=str(input()).split()
    m=[int(u) for u in r]
    hahaha+=max(m)
print(hahaha)
# Judge status: Accepted
a, b = map(int, input().split())
c = b - a
d = 0
for i in range(c, 0, -1):
    d += i
print(d - b)
# Judge status: Accepted
ab, bc, ca = map(int, input().split())

print((ab * bc) // 2)
# Judge status: Accepted
A, B = map(int, input().split())

x_min_tmp = A * 12.5
if x_min_tmp.is_integer:
  x_min = int(x_min_tmp)
else:
  x_min = int(x_min_tmp) + 1

x_max_tmp = (A + 1) * 12.5
x_max = int(x_max_tmp) + 1

ans = -1
for n in range(x_min, x_max + 1):
  if int(n * 0.08) == A and int(n * 0.1) == B:
    ans = n
    break

print(ans)
# Judge status: Accepted
import math

n = int(input())
print(math.floor(math.sqrt(n)) ** 2)
# Judge status: Wrong Answer
n = int(input())
x = list(map(int, input().split()))
hel = []
cnt = 0
for i in range(max(x)):
    for j in range(n):
        cnt += abs(x[j] - i) ** 2
    hel.append(cnt)
    cnt = 0
print(min(hel))
# Judge status: Wrong Answer
r, g, b = map(int, input().split())

if (r + g + b) % 4 == 0:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n=int(input())
C=[0]*(n-1)
S=[0]*(n-1)
F=[0]*(n-1)
for i in range(n-1):
  C[i],S[i],F[i]=map(int,input().split())
for i in range(n-1):
  ans=0
  for j in range(i,n-1):
    ans=max((ans+F[j]-1)//F[j]*F[j],S[j])+C[j]
  print(ans)
print(0)
# Judge status: Wrong Answer
N=int(input())
l=[int(x) for x in input().rstrip().split()]
now=[]
n=[]

for i in range(1,N-1):
  now.append(l[i-1])
  now.append(l[i])
  now.append(l[i+1])

  now.sort()
  n.append(now[1])
  now=[]

print(len(set(n)))
# Judge status: Accepted
X=list(input())

counter_s = 0

counter_t = 0

for i in range(len(X)):
    if counter_s == 0 and X[i] == 'T':
        counter_t += 1
    elif 0 < counter_s and X[i] == 'T':
        counter_s -= 1
    elif X[i] == 'S':
        counter_s += 1
print(counter_s+counter_t)
# Judge status: Wrong Answer
H,A =map(int,input().split())
print((H//A)+1)
# Judge status: Wrong Answer
a, b, k = map(int, input().split());

a = max(0, a - k);

if a == 0:
  b = max(0, b - k + a);
  
print(a,b);
# Judge status: Accepted
N,x = map(int,input().split())
a = list(map(int,input().split()))
count = 0
if a[0] > x:
    count += a[0] - x
    a[0] = x
for i in range(1,N):
    if a[i-1]+a[i] > x:
        count += (a[i-1]+a[i]) - x
        a[i] = x - a[i-1]
print(count)
# Judge status: Wrong Answer
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
cnt = 0
for i in range(n):
    cnt += min(a[i], b[i])
    b[i] -= min(a[i], b[i])
    cnt += min(a[i + 1], b[i])
    a[i] -= min(a[i + 1], b[i])
print(cnt)
# Judge status: Wrong Answer
alphabet = 'abcdefghijklmnopqrstuvwxyz'
print(alphabet[alphabet.find('a') + 1])
# Judge status: Wrong Answer
n,k=list(map(int,input().split()))
d = list(map(int,input().split()))

i =1
while True:
  if 10**(i-1)>n:
    break
  #i桁目の数字を取得
  tmp = (n%(10**i))//(10**(i-1))
  if tmp not in d:
    i+= 1
    continue
  else:
    n+=10**(i-1)
print(n)
# Judge status: Wrong Answer
n=int(input())
nl=[9**i for i in range(1,6)]
sl=[6**i for i in range(1,7)]
l = sorted(nl+sl)[::-1]
x=0
for i in l:
    while True:
        if i <=n:
            n=n-i
            x+=1
        else:
            break
print(x+n)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
ans = [0] * 9

for i in range(N):
  aa = int(A[i] / 400)
  if aa > 8:
    aa = 8
  ans[aa] += 1
  
min_a = 0
max_a = 0
for i in range(9):
  if i != 8:
    if ans[i] != 0:
      min_a += 1
      max_a += 1
  else:
    max_a += ans[i]
    
min_a = max(min_a, 1)    
print(min_a, max_a)
# Judge status: Wrong Answer
a,b=map(int,input().split())
if a%2==0 and b%2==0:
  print((a+b)//2)
  
else:
  print('IMPOSSIBLE')
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
cnt1 = 0
cnt2 = 0
for i in range(N):
    if A[i]>B[i]:
        cnt1 += A[i]-B[i]
    elif A[i]<B[i]:
        cnt2 += (B[i]-A[i])//2
if cnt1<=cnt2:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
X=int()
Y=int()
Z=int()
1<=X,Y,Z<=100
X,Y=Y,X
X,Z=Z,X
# Judge status: Accepted
N = int(input())
A = [list(map(int,input().split())) for i in range(N)]
cnt = 0
for i in range(N)[::-1]:
    if (A[i][0] + cnt)%A[i][1] != 0:
        cnt += A[i][1] - (A[i][0] + cnt)%A[i][1]
print(cnt)
# Judge status: Wrong Answer
d=[0]*8**7
for i in[*open(0)][1].split():d[int(i)]+=1
i=r=0
while i<1e6:
 i+=1;r+=d[i]==1;j=i
 while j<1e6:j+=i;d[j]&=d[i]<1
print(r)
# Judge status: Accepted
n = int(input())
x = list(map(int, input().split()))
if max(x)-min(x)==0:
    print(0)
else:
    k=max(x)-min(x)
    box=[0]*k

    for i in range(0,k):
        aa=0
        for j in range(0,n):
           aa = aa+(x[j]-min(x)-i)**2
        box[i]=aa


    print(min(box))
# Judge status: Accepted
import sys
N,M,K=map(int,input().split())
for i in range(N+1):
    for j in range(M+1):
        if i*j+(N-i)*(M-j)==K:
            print('Yes')
            sys.exit(0)
print('No')
# Judge status: Accepted
N = int(input())
ans = 1

for n in range(N):
  ans*=2
  if ans>N:
    print(int(ans/2))
    exit()
# Judge status: Accepted
s = list(input())
s = list(set(s))
flag = True
if "N" in s and not "S" in s:
    flag = False
if "S" in s and not "N" in s:
    flag = False
if "E" in s and not "W" in s:
    flag = False
if "W" in s and not "E" in s:
    flag = False
print("Yes" if flag else "No")
# Judge status: Accepted
N, M = map(int, input().split())

left = 1
right = N

for _ in range(M):
    l, r = map(int, input().split())

    if left < l:
        left = l
    if right > r:
        right = r

ans = right - left

print(ans + 1 if ans >= 0 else 0)
# Judge status: Accepted
# 142 A

n = int(input())
odd = 0

for i in range(1, n+1):
    if i % 2 != 0:
        odd += 1

x = odd/n
print('%.10f' % x)
# Judge status: Accepted
n = int(input())
al = [chr(i) for i in range(97,97+26)]

dpn = ['a']
dpp = []
if n == 1:
    print('a')
    exit()
for i in range(1,n):
    for j in dpn:
        for k in al[:max(list(map(ord,list(j))))-97+2]:
            if i != n-1:
                dpp.append(j + k)
            else:
                print(j+k)
    if i != n-1:
        dpn = dpp
        dpp = []
# Judge status: Wrong Answer
x,y = map(int,input().split())
if int(str(x)*y) >= int(str(y)*x):
    print(int(str(y)*x))
else:
    print(int(str(y)*x))
# Judge status: Accepted
X=int(input())
sig=[[1,1],[1,-1],[-1,1],[-1,-1]]
f=False
for i in range(200):
    for j in range(200):
        for s in sig:
            A=s[0]*i
            B=s[1]*j
            if A**5-B**5==X:
                f=True
                break
        if f:
            break
    if f:
        break
print(A,B)
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())

d = max(a,b)

e = c // d
f = c % d
if d == 0:
    print(e)
elif d != 0:
    print(int(e) + int(1))
# Judge status: Accepted
W, H, x, y = map(int, input().split())
if x == W / 2 and y == H / 2:
	print((W * H) / 2, 1)
else:
	print((W * H) / 2, 0)
'''
長方形を分割するためには長方形の中心を通る必要がある
ただし、指定された座標が中心の場合は無限に直線が弾ける
'''
# Judge status: Accepted
N = int(input())
 
res = {i+1: 0 for i in range(N)}
 
for i in range(1, int(N**0.5)):
  for j in range(1, int(N**0.5)):
    for k in range(1, int(N**0.5)):
      n = i**2 + j**2 + k**2 + i*j + j*k + k*i
      if n in res:
        res[n] += 1
for r in res.values():
  print(r)
# Judge status: Wrong Answer

url = "https://atcoder.jp//contests/abc129/tasks/abc129_b"

def main():
    n = int(input())
    t = list(map(int, input().split()))
    ans = 1000000000
    sums = sum(t)
    for v in t:
        sums -= v
        ans = min(sums, ans)
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
import math

def v(a, b, t):
    if (b * math.tan(math.pi / 2 - t * math.pi / 180) <= a):
        return a * b * b * math.tan(math.pi / 2 - t * math.pi / 180) / 2
    else:
        return a * a * (b - a * math.tan(t * math.pi / 180) / 2)

a, b, x = map(int, input().split())
left = 0
right = 90
eps = 1e-7
for _ in range(1000):
    mid = (left + right) / 2
    if (v(a, b, mid) > x):
        left = mid
    else:
        right = mid
print(mid)
# Judge status: Wrong Answer
s=input()
ans = []
for i in range(len(s)):
    ans.append(s[i])
j=1
while True:
    if ans[0]=="B":
        ans.pop(0)
    elif j>=len(ans):
        break
    elif ans[j]=="B":
        ans.pop(j-1)
        ans.pop(j-1)
    else:
        j+=1
print(*ans,sep="")
# Judge status: Accepted
a, b, c = reversed(sorted(input().split()))
print(int(a + b) + int(c))
# Judge status: Accepted
s = input()
n = len(s)

s1 = s[:int((n-1)/2)]
s2 = s[int((n+1)/2):]

s1_rev = s1[::-1]
s2_rev = s2[::-1]

if s == s[::-1]:
    if s1 == s1_rev and s2 == s2_rev:
        print('Yes')
    else:
        print('No')
else:
    print('No')
# Judge status: Accepted
n = int(input())
an = list(map(int, input().split()))
 
def distinct_or_not(an):
    an_dict = {}
    for a in an:
        if a in an_dict:
            return False
        else:
            an_dict[a] = 1
    return True
  
if distinct_or_not(an):
    print('YES')
else:
    print('NO')
# Judge status: Accepted
from collections import deque
n = int(input())
a = list(map(int, input().split()))

stack = deque()
for i in range(n):
    if i % 2 == 0: stack.append(a[i])
    else: stack.appendleft(a[i])
ans = list(stack)
if n % 2 != 0: ans = ans[::-1]
print(" ".join(map(str, ans)))
# Judge status: Accepted
number = input().split(" ")
N = int(number[0])
K = int(number[1])
word = input()
words = []
for i in word:
	words.append(i)
if words[K-1] == "A":
	words[K-1] = "a"
elif words[K-1] == "B":
	words[K-1] = "b"
else:
	words[K-1] = "c"
for i in words:
	print(i,end="")
# Judge status: Accepted
import sys

input = sys.stdin.readline


def main():
    N, M = map(int, input().split())
    like_food = [0] * M
    for _ in range(N):
        _, *A = map(int, input().split())
        for a in A:
            like_food[a - 1] += 1

    ans = like_food.count(N)
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
import sys


def resolve(in_):
    L = int(in_.read())
    return L ** -3


def main():
    answer = resolve(sys.stdin)
    print(answer)


if __name__ == '__main__':
    main()
# Judge status: Accepted
Num = 10 ** 9 + 7
N, M = map(int, input().split())
danger = -1
if M != 0:
  danger = int(input())
count = 1
l = [1, 1]
for i in range(1, N):
  if i == danger:
    l[1] = 0
    if count < M:
      danger = int(input())
      count += 1
  l = [l[1] % Num, l[0] + l[1]]
  if l == [0, 0]:
    break
if N == danger:
  l[1] = 0
print(l[1] % Num)
# Judge status: Wrong Answer
a,b = map(int, input().split())


listb = [4,6,9,11]

tmp = a in listb

print(tmp)

if (a == 2 and b ==2):
    print("YES")
elif (a in listb and b in listb):
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
input_nm = input().split(' ')
n = input_nm[0]
m = input_nm[1]
if n == m :
  print('yes')
else:
  print('no')
# Judge status: Wrong Answer
s = input()
t = input()

def sort(S):
   l = []
   for i in range(len(S)):
      l.append(S[i])
   l.sort(reverse=True)
   result = ''
   for i in range(len(l)):
      result += l[i]
   return result

if sort(s) < sort(t):
   print('Yes')
else:
   print('No')
# Judge status: Accepted
s=input()
k=int(input())
l=list(s)

for i in range(len(s)):
  f=(-ord(s[i])+ord("z")+1)%26
  if f<=k:
    l[i]="a"
    k-=f

k=k%26
a=ord(l[-1])+k 
if a> ord("z"):a-=26
l[-1]=chr(a)
print("".join(l))
# Judge status: Accepted
n=int(input())
ans=(n//11)*2

if n%11==0:
    print(ans)
elif n%11<=6:
    print(ans+1)
else:
    print(ans+2)
# Judge status: Accepted
t = input().strip()

ans = t.replace('?', 'D')
print(ans)
# Judge status: Accepted
N = int(input())

RL = [0] * (10 ** 7 + 10)
for i in range(1, 10 ** 7 + 10):
    RL[i] = RL[i-1] + i

#print("step")

ans = 0
for i in range(1, N+1):
    a = N // i
    #print(i, a)
    ans += RL[a] * i

print(ans)
# Judge status: Wrong Answer
import sys
import heapq
# \n
def input():
    return sys.stdin.readline().rstrip()


def main():
    N =int(input())

    if N>999:
        print(f"ABD{N-1000:03}")
    else:
        print(f"ABC{N:03}")









if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
l = [False]*9
ov = 0

for i in range(n):
    if a[i] < 3200:
        l[a[i]//400] = True
    else:
        ov += 1

ans = l.count(True)

print(ans, min(ans + ov, 8))
# Judge status: Accepted
x = int(input())

ans = x//11 * 2
mod = x%11

if 0 < mod < 7:
    ans += 1
elif mod >= 7:
    ans += 2

print(ans)
# Judge status: Wrong Answer
n = int(input())
A = list(map(int, input().split()))

dic = {}
for i in range(n):
  dic[i+1] = A[i]

ans = [dic[i+1] for i in range(n)]

print(*ans)
# Judge status: Accepted
n = int(input())
 
if n == 1:
  print(1)
 
elif n == 2:
  print(0.5)
  
elif n%2 == 0:
  print(0.5)
  
else:
  print((n+1)/2/n)
# Judge status: Wrong Answer
LI = lambda: list(map(int,input().split()))
MI = lambda: map(int,input().split())
yes = lambda: print("YES")
no = lambda: print("NO")
I = lambda: list(input())
J = lambda x: "".join(x)
II = lambda: int(input())
SI = lambda: input()
#---khan17---template
t = int(input())
print(3.14*t**2)
# Judge status: Wrong Answer
S = input()


def judge(S):
    dow = 'SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')
    if (S == dow[0]):
        return 7
    for i in range(1, len(dow)):
        if (S == dow[i]):
            return i


print(judge(S))
# Judge status: Accepted
a, b, c = map(int, input().split())

i = (max(0, c - (a + b)))**2
j = 4 * a * b
if i > j:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=min(a[i],b[i])
  if b[i]-a[i]>0:
    ans+=min(b[i]-a[i],a[i+1])
    a[i+1]-=min(b[i]-a[i],a[i+1])
print(ans)
# Judge status: Accepted

K = int(input())
S = input()


if K >= len(S):
    print(S)
else:
    Sk = S[:K]
    print(Sk+'...')
# Judge status: Accepted
N = int(input())
for i in range(1,10):
  if 1 <= (N // i) <= 9 and i * (N // i) == N:
    print('Yes')
    exit()
print('No')
# Judge status: Accepted
X=int(input())
ans=0
Y=100
while Y<X:
    Y+=Y//100
    ans+=1
print(ans)
# Judge status: Accepted
A,B = list(map(int,input().split()))

ans = 0

for i in range(2):
    if A == max(A,B):
        ans += A
        A -= 1
    else:
        ans += B
        B -= 1
        
print(ans)
# Judge status: Accepted
M=10**9+7
import sys
f=sys.stdin.readline
n,m=map(int,f().split())
s,t=0,1
u=0 if m<1 else int(f())
for i in range(n):
  if i==u-1:
    s,t=t,0
    try: u=int(f())
    except: pass
  else: s,t=t,(s+t)%M
print(t)
# Judge status: Accepted
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]

correct = [0 for i in range(N)]
for i in range(Q):
    correct[A[i]-1] += 1

for i in range(N):
    if Q - correct[i] < K:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
# -*- coding: utf-8 -*-

s = input().strip()


flag=0
ans=[]
for flag in [0,1]:
    
    calc=0
    for i in range(len(s)):
        if s[i] != str( (i%2 == flag)*1 ):
            calc += 1

    ans += [calc]
    
print(min(ans))
# Judge status: Accepted
X, Y = map(int, input().split())

a, b = divmod(2*X-Y, 3)
c, d = divmod(2*Y-X, 3) 
if (not b == d == 0) or (2*X < Y) or (2*Y < X):
  print(0)
else:
  m, n = 1, 1
  mod = 10**9+7
  for i in range(1, min(a, c)+1):
    m = (m * (a+c-i+1)) % mod
    n = (n * i) % mod
  ans = (m * pow(n, mod-2, mod)) % mod
  print(ans)
# Judge status: Accepted
#!/usr/bin/env python3
X, A, B = map(int, input().split())

if B <= A:
    print('delicious')
elif B - A <= X:
    print('safe')
else:
    print('dangerous')
# Judge status: Accepted
N, X, T = map(int, input().split())

ans = (N // X) * T

if N % X == 0:
    print(ans)
    exit()

else:
    ans += T
    print(ans)
# Judge status: Wrong Answer
import math
a, b, c = list(map(int, input().split(' ')))
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
    print('Yes')
else:
    print('No')
# left = 4 * a * b
# right = (c - (a + b))**2
# if left < right:
#     print('Yes')
# else:
#     print('No')
# Judge status: Wrong Answer
n=int(input())
h=list(map(int,input().split()))
mx=max(h)
for i in range(n):
    if mx-h[i]>=2:
        print('No')
        exit()
print('Yes')
# Judge status: Accepted
l,r = map(int,input().split())
mod = 2019
ans = 2018
if r-l>=2018:
    print(0)
else:
    for i in range(l,r+1):
        for j in range(i+1,r+1):
            ans = min(ans,(i*j)%mod)
    print(ans)