peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
N, K = map(int, input().split())
h = [None] * N
for _ in range(N):
    h[_] = int(input())

h.sort()
g = [None] * (N - 1)
for i in range(N - 1):
    g[i] = h[i + 1] - h[i]

g.sort()
print(sum(g[:K - 1]))
# Judge status: Accepted
N = list(input())
a = ['3']
b = ['0','1','6','8']
if N[-1] in a:
    print('bon')
elif N[-1] in b:
    print('pon')
else:
    print('hon')
# Judge status: Accepted
x, y = map(int, input().split())
if x % y == 0:
  print(-1)
else:
  print(x)
# Judge status: Accepted
k, n = map(int, input().split())
arr = list(map(int, input().split()))
ans = 0
for i in range(n):
    if i + 1 <= n - 1:
        if arr[i + 1] - arr[i] > ans:
            ans = arr[i + 1] - arr[i]
    else:
        if k - (arr[i] - arr[0]) > ans:
            ans = k - (arr[i] - arr[0])
print(k - ans)
# Judge status: Accepted
p=print;n,*a=map(int,open(0).read().split());t=sum(a);p(sum([w:=1]+[exit(p(-1))if(w:=min(2*(w-q),t:=t-q))<0 else w for q in a]))
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))

MAXN = N+1
p = 10**9+7
f = [1]
for i in range(MAXN):
    f.append(f[-1] * (i+1) % p)
def nCr(n, r, mod=p):
    return f[n] * pow(f[r], mod-2, mod) * pow(f[n-r], mod-2, mod) % mod

MA = max(A)
out = [MA,0]
MA2 = MA//2
mincand = 10**9
for i in range(N):
    if mincand>abs(A[i]-MA2) and A[i]!=MA:
        mincand = abs(A[i]-MA2)
        out[1] = A[i]
print(*out)
# Judge status: Accepted
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

def main():
    x, y, z = map(int, input().split())
    print(x * y // 2)


main()
# Judge status: Accepted
import sys
n =  int(input())
a = [int(input()) for i in range(n)]
ln = [i for i in a if i % 10 != 0]
ln.sort()
ans = sum(a)
for i in range(n):
    if ans % 10 != 0:
        print(ans)
        sys.exit()
    elif ln != []:
        print(ans - ln[0])
        sys.exit()
    else:
        print(0)
        sys.exit()
# Judge status: Wrong Answer
n, k = map(int, input().split())

snucks = set(i for i in range(1, k + 1))

for snack in range(1, k + 1):
    d = int(input())

    for snuck in map(int, input().split()):
        if snuck in snucks:
            snucks.remove(snuck)

print(len(snucks))
# Judge status: Accepted
s = input()
l = ["Sunny","Cloudy","Rainy","Sunny"]
for i in range(3):
  if s==l[i]:
     print(l[i+1])
# Judge status: Wrong Answer
n,m = map(int,input().split())
prbs = [ [0] for _ in range(1,n+1)]
#print(prbs)
for _ in range(m):
    i,j = map(str,input().split())
    i = int(i)
    i -= 1
    if prbs[i][-1] != "AC":
        prbs[i].append(j)
pen = 0
for i in range(n):
    pen += prbs[i].count("WA")
ans = 0
for i in range(n):
    ans += prbs[i].count("AC")
#print(prbs)
print(ans,pen)
# Judge status: Accepted
k, n = list(map(int, input().split()))
a = list(map(int, input().split()))

b = []
for i in range(n-1):
	b.append(a[i+1] - a[i])

b.append(k-a[-1]+a[0])

print(k - max(b))
# Judge status: Accepted
from sys import stdin
import math
inp = lambda : stdin.readline().strip()

n = int(inp())
a = [int(x) for x in inp().split()]
ans = 0
for i in range(1, n):
	if a[i] < a[i-1]:
		ans += a[i-1] - a[i]
		a[i] += a[i-1] - a[i]
print(ans)
# Judge status: Wrong Answer
n =int(input())
min_value =1000000000000
w = list(map(int,input().split()))
for i in range(n):
  a = sum(w[0:i])
  b = sum(w[i:n])
  if a - b < min_value and  a-b >= 0:
    min_value = a-b
print(min_value)
# Judge status: Accepted
A,B,C=map(int,input().split())
if(((A==B)and((B!=C)or(A!=C)))or((A==C)and((B!=C)or(B!=A))))or((B==C)and((B!=A)or(C!=A))):
  print('Yes')
else:
  print('No')
# Judge status: Accepted

def main():
    (A,B,C,K) = list(map(int, input().split(' ')))

    if K <= A:
        print(K)
    elif K <= A+B:
        print(A)
    elif K <= A+B+C:
        print(A-(K-A-B))
    else:
        print(A-C)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
X, K, D = map(int,input().split())

def func(i):
  if i >= 0: return i
  else: return -i

n = X // D
if K <= n: print(X - K * D)
else:
  X -= n * D
  K -= n
  if K % 2 == 0: print(X)
  else: print(-X + D)
# Judge status: Accepted
import sys

N = int(input())
A = list(map(int, sys.stdin.readline().rsplit()))

cnt = 0
S = 0
minA = 10 ** 9
for a in A:
    if a < 0:
        cnt += 1
    minA = min(minA, abs(a))
    S += abs(a)

if cnt % 2 == 0:
    res = S
else:
    res = S - 2 * minA

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

H_sorted = sorted(Hn,reverse=True)
H_sorted[:K]=[0]*K

print(sum(H_sorted))
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

count2 = 0
count4 = 0

for i in range(len(a)):
    if((a[i] % 4) == 0):
        count4 = count4 + 1;
    elif((a[i] % 2) == 0 and (a[i] % 4) != 0):
        count2 = count2 + 1;

#print("---")
#print(count4)
#print(count2)
#print("---")

if(count2 == 0 and n <= (1+ count4*2)):
    print("Yes")
elif(count2 != 0 and n <= (count2+ count4*2)):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from collections import Counter
n = int(input())
A = list(map(int, input().split()))
A_count = Counter(A)
x = [0, 0]
for a in A_count:
  if A_count[a] > 1:
    x.append(a)
  if A_count[a] > 3:
    x.append(a)
x.sort()
print(x[-1]*x[-2])
# Judge status: Wrong Answer
s = list(map(int, list(input())))
k = int(input())

f = True
for i in range(len(s)):
    if s[i] == 1:
        continue
    else:
        print(s[i])
        f = False
        break
if f:
    print(1)
# Judge status: Accepted
N,K = map(int,input().split())
HH = list(map(int,input().split()))

sHH = sorted(HH,reverse=True)
if N <= K:
    print(0)
else:
    HHsum = sum(sHH[K:])
    print(HHsum)
# Judge status: Accepted
import bisect
N = int(input())
L = list(map(int,input().split()))
L.sort()
count = 0

#a<=b<=c とする
#a,b 固定
for i in range(N):
  for j in range(i+1,N):
    a,b = L[i],L[j]
    k = bisect.bisect_left(L,a+b)
    count += k-j-1
 
print(count)
# Judge status: Accepted
icase=0
if icase==0:
    o=list(input())
    e=list(input())
    s=""
    for i in range(len(o)):
        s=s+o[i]
        if i<len(e):
            s=s+e[i]
    print(s)
# Judge status: Accepted
import math
A,B,H,M = map(int,input().split())
tmp_a = ((H%12)*30+0.5*M)%360
tmp_b = 6*M
tmp = abs(tmp_a-tmp_b)
r_2 = A**2 + B**2 -2*A*B*math.cos(math.radians(tmp))
print(math.sqrt(r_2))
# Judge status: Accepted
AB = list(input().split())
A = int(AB[0])
B = int(float(AB[1]) * 100 + 0.1)
print(A * B // 100)
# Judge status: Accepted
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 0
for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      price = i*500+j*100+k*50
      if price == X:
        ans += 1
print(ans)
# Judge status: Accepted
n=input();print([int(str(int(n[0])+1)*3),int(n[0]*3)][int(n[0]*3)>=int(n)])
# Judge status: Accepted
s = list(input())
if s[0]=='A':
    s.remove(s[0]);   l = len(s)
    for i in range(l):
        if s[1:l-1].__contains__('C'):
            s.remove('C')
            print('AC' if str(s) == str(s).lower() else 'WA');   break
        else:
            print('WA');   break
else:
    print('WA')
# Judge status: Accepted
import sys
from collections import Counter
read=sys.stdin.read

n,k,*a=map(int,read().split())

coa=Counter(a)
da=sorted(list(iter(coa)), key=coa.get)
print(sum(coa[x] for x in da[:len(da)-k]))
# Judge status: Wrong Answer
n=int(input())
s=input()
ans=0
x=0
for i in range(n):
    if s[i]=='I':
        ans+=1
        x=max(0,ans)
    else:
        ans-=1
print(x)
# Judge status: Accepted
a,b,c=map(int,input().split())
n=[a,b,c]
n.sort()
if n[2]==n[0]+n[1]:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n = int(input())

if n > 999:
  print("ABD")
else:
  print("ABC")
# Judge status: Accepted
n=int(input())
s=input()
w_cnt=s.count(".")

ans=[w_cnt]
b=0
w=w_cnt

for i in s:
    if i=="#":
        b+=1
    else:
        w-=1
    ans.append(b+w)

print(min(ans))
# Judge status: Accepted
N,K = map(int, input().split())
P = [int(i) for i in input().split()]
total, maxS = 0, 0
S = [0]
for p in P:
    total += p*(p+1)/2/p
    S.append(total)

for i in range(N-K+1):
    if maxS < S[i+K]-S[i]:
        maxS = S[i+K]-S[i]
print(maxS)
# Judge status: Wrong Answer
x = input()
s_count = x.count('S')
t_count = x.count('T')
count = 0
l = 0
r = len(x)-1

for i in range(len(x)):
    if s_count == 0 or t_count == 0:
        break
    if x[i]=='S':
        s_count -= 1
        if t_count > 0:
            count += 1
    else:
        t_count -= 1
print(len(x)-count*2)
# Judge status: Accepted
a,b,x = map(int,input().split())

if a > x:
  print("NO")
elif a+b < x:
  print("NO")
else:
  print("YES")
# Judge status: Wrong Answer
n=int(input())
s=[input() for i in range(n)]

a=[]
c=0

for i in s:
    if i not in a:
        c+=1

print(c)
# Judge status: Wrong Answer
N = list(map(int, input().split()))


for i in range(len(N)):
  if N[i]==0:
    print(i)
# Judge status: Accepted
# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
N = int(input())
A = list(map(int, input().split()))
mod =10**9 +7
sum_a =sum(A)
ans =0
for i in range(N-1):
    sum_a -=A[i]
    ans +=(A[i] *(sum_a)) %mod
ans %=mod        
print(ans)
# Judge status: Accepted
import collections

n = int(input())
l = list(map(int, input().split()))
l = sorted(l, reverse=True)

i = 1
a = 0
b = 0
while i < n:
    if l[i] == l[i-1]:
        if a == 0:
            a = l[i]
        else:
            b = l[i]
            break
        i += 2
    else:
        i += 1

print(a*b)
# Judge status: Wrong Answer
import itertools

bingo = []
sheet = set()
for _ in range(3):
  lst = [int(i) for i in input().split()]
  bingo.append(lst)
n = int(input())
for _ in range(n):
  a = int(input())
  for i in range(3):
    for j in range(3):
      if bingo[i][j] == a:
        num = 3 * i + j
        sheet.add(num)
flag = False
for v in itertools.combinations(sheet, 3):
  if (v[0] + v[1] + v[2]) % 3 == 0:
    flag = True
    break
if flag:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n,p=map(int,input().split())
A=[i%2 for i in map(int,input().split())]
A0=A.count(0)
A1=A.count(1)
if p==1 and A1==0:
    print(0)
elif p==0 and A1==0:
    print(2**A0)
else:
    print((2**A0)*(2**A1)//2)
# Judge status: Wrong Answer
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

W,H,N = LI()

s,t,u,v = 0,W,0,H
for i in range(N):
    x,y,a = LI()
    if a == 1:
        s = max(s,x)
    if a == 2:
        t = min(t,x)
    if a == 3:
        u = max(u,y)
    if a == 4:
        v = min(v,y)

print(max(0,(t-s)*(v-u)))
# Judge status: Accepted
S = input().strip()
x = sum(c == '0' for c in S)
y = len(S) - x
print(2 * min(x, y))
# Judge status: Accepted
n,d = map(int,input().split())
cnt = 0
d = d**2
for _ in range(n):
    x,y = map(int,input().split())
    val = x**2 + y**2
    if d>=val: cnt += 1
print(cnt)
# Judge status: Wrong Answer
def main():
	n=int(input())
	a=list(map(int, input().split()))
	count=[0]*n
	for i in range(n):
		count[i] = a.count(a[i])
	if sum(count)==0:
		print('YES')
	else:
		print('NO')
main()
# Judge status: Wrong Answer
N,M=[int(i) for i in input().split()]
PY=[[] for _ in range(N)]
py=[]

for i in range(M):
    p,y=[int(i) for i in input().split()]
    py.append((p,y))
    PY[p-1].append(y)

for j in range(N):
    PY[j]=sorted(PY[j])

for i in range(M):
    p,y=py.pop(0)
    #print(PY[p].index(y))
    p_zero=6-len(str(p-1))
    y_zero=6-len(str(PY[p-1].index(y)))
    print("0"*p_zero + str(p) + "0"*y_zero + str(PY[p-1].index(y)+1))
# Judge status: Accepted
X,A,B = map(int, input().split())

if B <= A:
    ans = "delicious"
elif B <= A+X:
    ans = "safe"
else:
    ans = "dangerous"
print(ans)
# Judge status: Wrong Answer
n,*a=map(int,open(0).read().split())
b=sum(a)
c=1
ans=1
if a[0]!=0:
    print(-1)
    exit()
for i in a[1:]:
    b-=i
    c=min(c*2-i,b)
    ans+=c
    if c<0:
        print(-1)
        exit()
print(ans+sum(a))
# Judge status: Accepted
n,a,b = [int(x) for x in input().split()]
if (b-a)%2==0:
    print((b-a)//2)
else:
    print(min(a+(b-a-1)//2,n-b+1+(b-1-a)//2))
# Judge status: Accepted
import math
from decimal import *
getcontext().prec = 300
a,b = map(Decimal,input().split())
print(math.floor(Decimal(a) * Decimal(b)))
# Judge status: Accepted
n,a,b=map(int,input().split())
ans=0
for i in range(n+1):
    if sum(list(map(int,list(str(i)))))>=a and sum(list(map(int,list(str(i)))))<=b:
        ans+=i
print(ans)
# Judge status: Wrong Answer
N,K,Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
B = [0 for i in range(N)]
for x in A:
  B[x-1] += 1
for x in B:
  k = Q - x
  if K - k + x > 0:
    print("Yes")
  else:
    print("No")
# Judge status: Accepted
L, R = map(int, open(0).read().split())

ans = 2020
m = min(L + 2020, R) + 1
for i in range(L, m):
    for j in range(i + 1, m):
    	ans = min(ans, i * j % 2019)

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

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')
# Judge status: Accepted
a, b = map(int, input().split())
lst = []
s = 0

for i in range(1, 1001):
    s += i
    lst.append(s)

for i in range(999):
    x = lst[i] - a
    y = lst[i+1] - b

    if x == y and x > 0 and y > 0:
        print(x)
# Judge status: Wrong Answer
a, b = map(int, input().split())
print('AC' if a is b else 'WA')
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()

import bisect as bi
ans=0
for i in range(n):
    q=B[i]
    oka= bi.bisect_left(A,q)
    okb= n- bi.bisect_right(C,q)
    ans+=oka*okb
print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
s=[]
c=[]
num=[]
for i in range(m):
  S, C = map(int, input().split())
  s.append(S)
  c.append(C)

for i in range(10**(n+1)):
  String=str(i)
  if len(String) == n and all([String[s[j]-1] == str(c[j]) for j in range(m)]):
    print(str(i))
    exit()
print('-1')
# Judge status: Accepted
K, X = map(int, input().split())
ans = list()
for i in range(X-(K-1), X+K):
    ans.append(i)
print(" ".join(map(str, ans)))
# Judge status: Accepted
def main(S,T,A,B,U):
    if S == U:
        print(A-1,B)
    if T == U:
        print(A,B-1)
    
S,T = input().split()
A,B = map(int, input().split())
U = input()
main(S,T,A,B,U)
# Judge status: Accepted
N,M = map(int,input().split())
left = []
right = []
for i in range(M):
    l,r = map(int,input().split())
    left.append(l)
    right.append(r)
if max(left)>min(right):
    print(0)
else:
    print(min(right)-max(left)+1)
# Judge status: Accepted
import sys

K, S = map(int, sys.stdin.readline().strip().split())

N_MAX = min(K, S)

ans = 0
for i in range(N_MAX+1):
    for j in range(N_MAX+1):
        if 0 <= S - (i + j) <= K:
            ans += 1

print(ans)
# Judge status: Accepted
n,k = map(int,input().split())
L = list(map(int,input().split()))
L.sort()

sum1 = 0
cnt = 0
if k < L[0]:
    print(0)
    exit()
for i in range(n):
    sum1 +=L[i]
    if sum1 <=k:
        cnt +=1
        if i == n-1 and sum1 != k:
            cnt -=1
    else:
        break
print(cnt)
# Judge status: Accepted
def main(D):
    if D == 25:
        return 'Christmas'
    elif D == 24:
        return 'Christmas Eve'
    elif D == 23:
        return 'Christmas Eve Eve'
    else:
        return 'Christmas Eve Eve Eve'

D = int(input())
print(main(D))
# Judge status: Accepted
import sys
input=sys.stdin.readline
S = input()[:-1]
n = len(S)
def kaibun(S):
    if S == S[::-1]:
        return 1
    else:
        return 0
if kaibun(S) == 0:
    print("No")
else:
    s1 = S[0:n // 2]
    if kaibun(s1) == 1:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
import collections
import numpy as np

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = [0 for _ in range(Q)]
C = [0 for _ in range(Q)]
for i in range(Q):
  B[i], C[i] = map(int, input().split())
  
a = collections.Counter(A)
S = np.sum(A)
for i in range(Q):
  S += (C[i]-B[i]) * a[B[i]]
  a[C[i]] += a[B[i]]
  a[B[i]] = 0

  print(S)
# Judge status: Accepted
N = int(input())
c = list(str(input()))
for i in range(N):
    if c[i] == "R":
        c[i] = 1
    else:
        c[i] = 0
a = sum(c)
d = c[:a]
e = sum(d)
print(a - e)
# Judge status: Accepted
n,m = map(int,input().split())
a = [list(map(int,input().split())) for i in range(n)]
b = [list(map(int,input().split())) for i in range(m)]

ans = []

for i in a:
  count = 10**10
  check = 0
  for j in range(m):
    if count > abs(i[0]-b[j][0])+abs(i[1]-b[j][1]):
      check = j+1
      count = abs(i[0]-b[j][0])+abs(i[1]-b[j][1])
    
  ans.append(check)
for i in ans:
  print(i)
# Judge status: Accepted

l,r,d=map(int,input().split())
i=1
j=0
result=0
while result<=r:
  if result>=l:
    j +=1
  result=d*i
  i+=1
print(j)
# Judge status: Accepted
def main():
    x, y = map(int, input().split())
    answer = 0
    if abs(x) != abs(y):
        answer += abs(abs(x) - abs(y))
    if (x < 0 and y < x < 0) or (0 < y < x):
        answer += 2
    elif x * y < 0 or (0 < x and y == 0) or (x == 0 and y < 0):
        answer += 1
    print(answer)


if __name__ == '__main__':
    main()
# Judge status: Accepted
N, M = list(map(int, input().split()))
N_i = [1 for i in range(N)]
H = list(map(int, input().split()))


for i in range(M):
    #print("i+1=",i+1)
    A, B = map(int, input().split())
    if H[A-1] > H[B-1]:
        #print('Atakai')
        N_i[B-1] = 0
    elif H[A-1] < H[B-1]:
        #print('B')
        N_i[A-1] = 0
    else:
        N_i[A-1] = 0
        N_i[B-1] = 0



print(N_i.count(1))
#print(N_i)
# Judge status: Wrong Answer
if (int(input().replace(" ",""))) % 4 == 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import bisect
n = int(input())
a = [int(input()) for _ in range(n)]
dp = [float('inf')]*n
for i in range(n):
  c = a[n-i-1]
  b = bisect.bisect_right(dp,c)
  if dp[b] > c:
    dp[b] = c
print(bisect.bisect_right(dp,10**9+1))
# Judge status: Accepted
a,b,x=map(int,input().split())
b1=b//x
a1=(a-1)//x
print(b1-a1)
# Judge status: Accepted
def main():
    N = int(input())
    for i in range(1, 10):
        for j in range(1, 10):
            if i * j == N:
                print("Yes")
                return

    print("No")
    return

if __name__ == "__main__":
    main()
# Judge status: Accepted
#!/usr/bin/env python3

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

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

N = B - A + 1

g = lcm(C,D)
C_ = B//C - (A-1)//C
D_ = B//D - (A-1)//D
CD_ = B//g - (A-1)//g
ans = N - C_ - D_ + CD_
print(ans)
# Judge status: Accepted
S = input()

a = 0
b = 0

for i, s in enumerate(S):
    if i % 2 == 0:
        if s == '0':
            a += 1
        else:
            b += 1
    else:
        if s == '1':
            a += 1
        else:
            b += 1

print(min(a, b))
# Judge status: Accepted
N,K = map(int,input().split())

S = list(input())

S[K-1] = chr(ord(S[K-1])+32)
print("".join(map(str,S)))
# Judge status: Accepted
A, B, C, X, Y = map(int, input().split())
C *= 2
if X == Y:
    print(min(C * X, A * X + B * Y))
if X > Y:
    print(min(C * X, C * Y + A * (X - Y), A * X + B * Y))
if X < Y:
    print(min(C * Y, C * X + B * (Y - X), A * X + B * Y))
# Judge status: Accepted
s=input()
if(ord(s)>96):
    print("a")
else:
    print("A")
# Judge status: Accepted
n = int(input())
A = [0] + list(map(int,input().split()))
B = [0]*(n+1)
m = 0
for i in range(n,0,-1):
    cnt = 0
    for j in range(i,n+1,i):
        cnt += B[j]
    if cnt%2==A[i]:
        continue
    else:
        B[i] =1
        m += 1
print(m)
for i in range(len(B)):
    if B[i]==1:
        print(i)
# Judge status: Accepted
a,b=map(int,input().split())
ans=0
for i in range(a,b+1):
    s=str(i)
    l=len(s)
    for i in range(l//2):
        if s[i]!=s[l-1-i]:
            break
    else:
        ans+=1
print(ans)
# Judge status: Wrong Answer
n = int(input())
s = list(input())
count = 0
for i in s:
    if i =='I':
        count += 1
    elif i == 'D':
        count -= 1
print(count)
# Judge status: Accepted
a=list(input())[::-1]
b=list(input())[::-1]
c=list(input())[::-1]
if a==list("aca"):print("A");exit()
if a==list("abcb")[::-1]:print("C");exit()
turn="a"
while 1:
  if turn=="a":
    turn=a.pop()
    if len(a)==0:print("A");exit()
  elif turn=="b":
    turn=b.pop()
    if len(b)==0:print("B");exit()
  else:
    turn=c.pop()
    if len(c)==0:print("C");exit()
# Judge status: Wrong Answer
N, K = map(int, input().split())
As = list(map(int, input().split()))

def isOK(L):
    num = 0
    for A in As:
        num += -(-A // L) - 1
    return num <= K

ng, ok = 0, 10**9
while abs(ok-ng) > 10**-6:
    mid = (ng+ok) / 2
    if isOK(mid):
        ok = mid
    else:
        ng = mid

k = int(-(-ok // 1))

for L in range(k-2, k+3):
    if isOK(L):
        print(L)
        break
# Judge status: Accepted
n, h = map(int, input().split())
h2 = h
l = []
for i in range(n):
  l.append(list(map(int,input().split())))

l_b = sorted(l, key=lambda x: x[1])
l = sorted(l_b, reverse=True, key=lambda x: x[0])
c_a = 0
c_b = 0
b_sum = 0

for i in range(n-1, -1, -1):
  if l_b[i][1] >= l[0][0]:
    b_sum += l_b[i][1]
    h -= l_b[i][1]
    c_b += 1
    if h <= 0:
      print(c_b)
      exit()
import math
c_a = math.ceil((h2 - b_sum) / l[0][0])


print(c_a+c_b)
# Judge status: Accepted
from fractions import gcd

n=int(input())
a=[int(i) for i in input().split()]
a1=[a[0]]
for i in range(1,n-1):
    a1.append(gcd(a1[-1],a[i]))
a2=[a[-1]]
for i in range(n-2,0,-1):
    a2.append(gcd(a2[-1],a[i]))
m=[]
for i in range(n-2):
    m.append(gcd(a1[i],a2[-i-2]))
m.append(a1[-1])
m.append(a2[-1])
print(max(m))
#print(a1)
#print(a2)
#print(m)
# Judge status: Accepted
k, a, b = map(int, input().split())
if b - a <= 1:
    print(k + 1)
else:
    n = a
    n += int((k + 1 - a) / 2) * (b - a)
    n += (k + 1 - a) % 2
    print(n)
# Judge status: Wrong Answer
import math
n,k=map(int,input().split())
ans=0
for b in range(k+1,n+1):
  ans+=(b-k)*(n//b)+n-b*n//b+k+1
  
print(ans)
# Judge status: Accepted
from collections import deque
n, m, k = map(int, input().split())
ans = []
for i in range(0, n + 1):
    for j in range(0, m + 1):
        cnt = (i * m) + (j * n) - 2 * (i * j)
        # print(i, j, cnt)
        ans.append(cnt)
if k in ans:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
S = input()
day = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - day.index(S))
# Judge status: Accepted
L, R = map(int, input().split())

if R - L >= 2019:
    res = 0
else:
    res = float("inf")
    L = L % 2019
    R = R % 2019
    for i in range(L, R + 1):
        for j in range(i + 1, R + 1):
            res = min(res, (i * j) % 2019)
print(res)
# Judge status: Accepted
import math
A = [int(input()) for _ in range(5)]
ad = 0
rm = 0
for i in range(5):
    ad += math.ceil(A[i]/10)*10
    rm = max(math.ceil(A[i]/10)*10 - A[i],rm)
print(ad-rm)
# Judge status: Wrong Answer
def a(s):

    return "Yes" if s.count("A") != 0 else "No"


def main():
    s = str(input())
    print(a(s))

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

def solve():
    input = sys.stdin.readline
    N = int(input())
    A = [int(a) for a in input().split()]
    B = [int(b) for b in input().split()]
    C = [A[i] - B[i] for i in range(N)]
    sumA = sum(A)
    sumB = sum(B)
    addA, addB = 0, 0
    for i, c in enumerate(C):
        if c > 0: addB += c
        else: addA += (-1 * c + 1) // 2
    if addA > sumB - sumA or addB > sumB - sumA: print("No")
    else: print("Yes")

    return 0

if __name__ == "__main__":
    solve()
# Judge status: Accepted
from sys import stdin
from sys import setrecursionlimit
import math
setrecursionlimit(10 ** 7)

a,b = input().split()

a = int(a)
b = int(b.replace(".",""))

print(a*b//100)
# Judge status: Accepted
a,b=map(int,input().split())
if ( a<0 and b>0 ) or ( a>0 and b<0 ) or a==0 or b==0:
	print('Zero')
else:
	if a>0 and b>0:
		print('Positive')
	else:
		c=b-a
		print('Positive' if c&1 else 'Negative')