peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N,M,K = map(int,input().split())
ans = 'No'
for n in range(N+1):
    for m in range(M+1):
        tmp = ((N-n)*m + (M-m)*n)
        if tmp==K:
            ans = 'Yes'
print(ans)
# Judge status: Accepted
n = int(input())
s = input()
if n % 2 == 1:
  print("No")
elif s[:n//2] == s[n//2:] :
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
N, M = map(int, input().split())
pS = []
for _ in range(M):
    pS.append(input().split())

current = 0
penalty = 0
state = [False] * (N+1)
for i in pS:
    if i[1] == "WA" and (not state[int(i[0])]):
        penalty += 1
    elif i[1] == "AC" and (not state[int(i[0])]):
        current += 1
        state[int(i[0])] = True
print(current, penalty)
# Judge status: Accepted
#!/usr/bin/env python
# coding: utf-8

# In[17]:


N,x = map(int, input().split())
a = list(map(int, input().split()))


# In[18]:


a_sum = sum(a)
if a_sum == x:
    print(N)
elif a_sum < x:
    print(N-1)
else:
    for i in range(N):
        if x < sum(sorted(a, reverse=False)[:i+1]):
            print(i)
            break


# In[ ]:
# Judge status: Accepted
K, A, B = map(int, input().split())

if B-A <= 2:
    print(K+1)
    exit(0)

if 1+(K-2) < A:
    print(K+1)
    exit(0)

exchange_times, last = divmod(K-(A-1), 2)
profit = B - A
ans = A + exchange_times * profit + last
print(ans)
# Judge status: Wrong Answer
S = input()
from collections import Counter
C = Counter(S)
if len(C.keys()) == 1:
    if sum(C.values()) >= 2:
        print("NO")
    else:
        print("YES")
elif len(C.keys()) == 2:
    if sum(C.values()) < 3:
        print("YES")
    else:
        print("NO")
else:
    print("YES")
# Judge status: Accepted
a,b,c=sorted(list(map(int,input().split())))
ans=c-b
if (b-a)%2==0:
  print(ans+(b-a)//2)
else:
  print(ans+(b-a)//2+2)
# Judge status: Wrong Answer
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = input()
#  = int(input())
a, b  = map(float, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

print(int(int(a) * b))
# Judge status: Accepted
A, B, C = [int(i) for i in input().split()]

if A == B and A != C:
    print("Yes")
elif B == C and B != A:
    print("Yes")
elif A == C and A != B:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N,price = map(int, input().split())

if N >= 13:
  print(price)

elif N >= 6:
  print(price // 2)
  
else:
  print("0")
# Judge status: Accepted
n,r=map(int,input().split())
if n>=10:
  print(r)
else:
  print(r+100*(10-n))
# Judge status: Accepted
def main():
  N = int(input())
  A = list(map(int, input().split()))
  Q = int(input())

  MAX = 10 ** 5

  total = sum(A)
  counts = [0] * (MAX + 1)

  for v in A:
    counts[v] += 1

  for _ in range(Q):
    B, C = list(map(int, input().split()))
    diff = C - B
    t = counts[B]
    counts[B] = 0
    counts[C] += t

    total += diff * t
    print(total)

if __name__ == "__main__":
  main()
# Judge status: Accepted
import sys
n = int(input())
a = list(map(int, input().split()))
a.sort()
a.reverse()
ans = []
for i in range(0,n-1):
    if(a[i]==a[i+1]):
        ans.append(a[i])
if len(ans) <2:
    print(0)
    sys.exit()
        
if (ans[0]==ans[1] and ans[1]!=ans[2]):
    print(ans[0]*ans[2])
    sys.exit()

print(ans[0]*ans[1])
# Judge status: Accepted
from collections import defaultdict


def main():
    N = int(input())
    restaurant = defaultdict(list)
    for i in range(N):
        tmp = input().split()
        restaurant[tmp[0]].append((int(tmp[1]), i+1))

    name_list = sorted(list(restaurant.keys()))

    for n in name_list:
        tmp = sorted(restaurant[n], key=lambda x: x[0], reverse=True)
        for t in tmp:
            print(t[1])


if __name__ == "__main__":
    main()
# Judge status: Accepted
n,a,b=map(int,input().split())
answer=0
if a==0:
    answer=0
elif b==0:
    answer=n
elif a==1 and b==1:
    answer=n//2
else:
    while n>a+b:
        answer+=n//(a+b)*a
        n-=n//(a+b)*(a+b)
    if n>a:
        answer+=a
    else:
        answer+=n
print(answer)
# Judge status: Accepted
d, n = map(int, input().split())
if n == 100:
	n = 101
print(100**d * n)
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))
a=0
for i in range(N-1):
    if (A[i+1]-A[i])>=0:
        a=a+(A[i+1]-A[i])
    else:
        a=a
print(a)
# Judge status: Wrong Answer
k=int(input())
s=input()

if(len(s)<k):
    print(s)
else:
    print(s[:7]+"...")
# Judge status: Accepted
N = int(input())
S = input()
x = 0
a = []
for i in range(N):
    if S[i] == 'I':
        x += 1
    else:
        x -= 1
    a.append(x)
a.append(0)
a = sorted(a)
ans = a[N]
print(ans)
# Judge status: Accepted
N,*S=map(int,open(0))
S.sort()

ans=sum(S)
i=0
if ans%10==0:
    while i<N:
        if S[i]%10>0:
            ans-=S[i]
            break
        i+=1

if i==N:
    print(0)
else:
    print(ans)
# Judge status: Accepted
S = list(input())
if len(set(S)) == 3:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if (v-w)*t >= b-a:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
n,r = map(int,input().split())
if n >= 10:
    print(r)
else:
    print(r+100*(10-n))
# Judge status: Accepted
x, n = map(int, input().split())
if n == 0:
    print(x)
else:
    p = [int(_) for _ in input().split()]
    for i in range(100):
        if x-i not in p:
            print(x-i)
            break
        if x+i not in p:
            print(x+i)
            break
# Judge status: Wrong Answer
a, b, c, d = map(int, input().split())
if (b < c) or (d < a):
    print(0)
elif a <= c:
    print(b - c)
else:
    print(d - a)
# Judge status: Accepted
n, k, q = map(int, input().split())
point = [k - q for _ in range(n)]
for _ in range(q):
  a = int(input())
  point[a - 1] += 1
for p in point:
  if p <= 0:
    print("No")
  else:
    print("Yes")
# Judge status: Wrong Answer
n,w=map(int,input().split())
dp=[-1]*(w+1)
dp[0]=0
for _ in range(n):
  a,d=map(int,input().split())
  for b in range(w,a-1,-1):
    if dp[b-a]!=-1:
    	dp[b]=max(dp[b],d+dp[b-a])
print(dp[b])
# Judge status: Accepted
n = int(input())
ans = 0
for i in range(1, n+1):
    count = 0
    for j in range(1, i+1):
        if i % j == 0:
            count += 1
    if count == 8 and i%2 != 0:
        ans += 1
print(ans)
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))
X=sum(A)
for i in range(1,N):
  A[i]+=A[i-1]
ans=1000000007
for i in range(N-1):
  x=abs(X-2*A[i])
  ans=min(ans,x)
print(ans)
# Judge status: Accepted
N = int(input())

k = 1
while k * (k + 1) // 2 < N:
    k += 1

ans = list(range(1, k+1))
v = k * (k + 1) // 2 - N
if v > 0:
    ans.remove(v)

for i in ans:
    print(i)
# Judge status: Wrong Answer
import statistics
n=int(input())
x=list(map(int,input().split()))
x.sort()
for i in range(n):
    a=x[:i]+x[i+1:]
    print(a[n//2-1])
# Judge status: Accepted
import math

n = int(input())

start = int(math.sqrt(n)+0.5)
l =[]
for i in range(1,start+1):
    if n % i == 0:
        a = i
        b = n // i
        l.append(a+b-2)

print(min(l))
# Judge status: Accepted
def main():
    h, a = map(int, input().split())

    ans = 0
    while h > 0:
        h -= a
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
from collections import Counter

s = Counter(input())
t = Counter(input())

sv = sorted(s.values())
tv = sorted(t.values())

if sv == tv:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import collections

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

A = collections.Counter(A).most_common()
N = len(A)

ans = [0]

for i in range(N):
    if A[i][1] >= 4:
        ans.append(A[i][0]**2)

ref = []
for j in range(N):
    if A[j][1] >= 2:
        ref.append(A[j][0])
ref = sorted(ref)
if len(ref) >= 2:
    ans.append(ref[-2]*ref[-1])

print(max(ans))
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
for i in range(n):
  ans[a[i]-1]=i+1
print(*ans)
# Judge status: Wrong Answer
import collections

N=int(input())
list=[input() for i in range(N)]

c= collections.Counter(list)

m=0
for i in c.values():
    m+=i

print(m)
# Judge status: Accepted
N = int(input())
done = [0] * N
button = [int(input()) for _ in range(N)]
done[0] = 1
i = 0
ans = 1
for _ in range(N):
  i = button[i] - 1
  if i == 1:
    print(ans)
    exit()
  if done[i] == 1:
    print(-1)
    exit()
  else:
    done[i] = 1
    ans += 1
# Judge status: Accepted
n, m = map(int, input().split())
result = 1
for i in range(int(m**0.5), 0, -1):
    if m % i == 0:
        j = m // i
        if i >= n:
            result = max(result, j)
        elif j >= n:
            result = max(result, i)
print(result)
# Judge status: Accepted
n, m = map(int, input().split())
ans = 0
if m >= n*2:
    m -= n*2
    ans += n
    ans += m // 4
else:
    ans += m // 2
print(ans)
# Judge status: Accepted
n = int(input())
al = list(map(int, input().split()))

n0, n2, n4 = 0, 0, 0

for a in al:
    if a % 4 == 0:
        n4 += 1
    elif a % 2 == 0:
        n2 += 1
    else:
        n0 += 1

print('Yes' if n4+1 >= n0+n2%2 else 'No')
# Judge status: Accepted
s = str(input())
 
length = len(s)
 
n = length//2
 
m = 0
 
for i in range(n):
  x = (i+1)*(-1)
  if s[i]!=s[x]:
    m += 1
print(m)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
if n%2==0:
    for i in range(n-1,0,-2):
        print(a[i],end=" ")
    for i in range(0,n,2):
        print(a[i],end=" ")
else:
    for i in range(n-1,-1,-2):
        print(a[i],end=" ")
    for i in range(1,n,2):
        print(a[i],end=" ")
# Judge status: Accepted
r=input()
R=int(r)
bai=int(R**2)
print(bai)
# Judge status: Wrong Answer
a = input().split()
print(a)
print(a[0])
K = int(a[0])
X = int(a[1])
if 500 * K >= X:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N = int(input())
h = list(map(int,input().split()))
cost = [1000000]*(N+10)
cost[0] = 0
for i in range(1, N):
  cost[i] = min((abs(h[i-1] - h[i]) + cost[i-1]),cost[i])
  if i >= 2:
    cost[i] = min((abs(h[i-2] - h[i]) + cost[i-2]), cost[i])
print(cost[N-1])
# Judge status: Wrong Answer
a = list(map(int, input().split()))
s, m, b = sorted(a)
cnt = 0
m_s = m - s

if m_s % 2 == 0 and m < b and m_s != 0:
    cnt += m_s // 2
    s += m_s
elif m_s % 2 == 1 and m < b:
    cnt += 1
    s += 1
    b += 1
b_m = b - m
cnt += b_m
print(cnt)
# Judge status: Accepted
a = list(map(int, input().split()))
a.sort()

print(a[0]+a[1])
# Judge status: Accepted
n = int(input())
arr = list(map(int,input().split()))
addarr = [i+1+arr[i] for i in range(n)]
diffarr = [i+1-arr[i] for i in range(n)]

from collections import Counter
cnt = Counter([addarr[0]])
ans = 0

for i in range(1,n):
    tmp = diffarr[i]
    ans += cnt[tmp]
    cnt.update([addarr[i]])

print(ans)
# Judge status: Accepted
a,b,c = (int(x) for x in input().split())
if a+b < c:
  print ('No')
else:
  print ('Yes')
# Judge status: Wrong Answer
def resolve():
	n = int(input())
	ans = 1000000
	a = list(map(int, input().split()))
	for i in range(-100, 101):
		tmp = 0

		for j in a:
			tmp += (j-i)**2
		if tmp < ans:
			ans = tmp
	print(ans)
# Judge status: Accepted
n , y = map(int, input().split())

i = y//10000
j = y//5000
k = y//1000

for p in range(i+1):
  for q in range(j+1):
    if (n-p-q)>=0 and (p*10000)+(q*5000)+((n-p-q)*1000)==y:
      print(p, q, n-p-q)
      exit()
    
print(-1, -1, -1)
# Judge status: Accepted
S = input()
stack = []

cnt = 0
for s in S:
    if len(stack) == 0:
        stack.append(s)
    elif len(stack) > 0 and stack[-1] != s:
        stack.pop()
        cnt += 2
    else:
        stack.append(s)

print(cnt)
# Judge status: Accepted
N,M,X,Y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

answer="War"
Z_x=max(x)+1
Z_y=min(y)

if Z_x<=Z_y:
    for z in range(Z_x,Z_y+1):
        if X<z<=Y:
            answer="No War"
            break
print(answer)
# Judge status: Wrong Answer
N,K = map(int,input().split())

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

M = N-K

if M == 1:
  if score_list[K-1] < score_list[K]:
    print("Yes")
  else:
    print("No")

else:
  for i in range(M):
    if sum(score_list[i:i+K]) < sum(score_list[i+1:i+K+1]):
      print("Yes")
    else:
      print("No")
# Judge status: Wrong Answer
import math

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

p = 0
for i in range(1,N+1):
    if i >= K:
        p += (N-K-1)/N
        break
    else:
        p += 1/N * ((0.5)**math.ceil(math.log2(K/i)))
        # print((0.5)**math.ceil(math.log2(K/i)))

print(p)
# Judge status: Accepted
a, b, c, d = list(map(int, input().split()))
n = int(input())

# 1リットル買う
min_for_one = min(a*4, b*2, c)

min_for_two = min(a*8, b*4, c*2, d)

if n % 2 == 1:
    print((n //2)* min_for_two + min_for_one)
else:
    print(n // 2 * min_for_two)
# Judge status: Accepted
A, B, C = map(int, input().split())
print("YES" if any((A*i)%B==C for i in range(B)) else "NO")
# Judge status: Wrong Answer
N=int(input())
*A,=sorted(map(int,input().split()))
*B,=sorted(map(int,input().split()))
*C,=sorted(map(int,input().split()))

lenc=len(C)

from bisect import *

cnt=0
for b in set(B):
    in_a = bisect_left(A, b)
    in_c = bisect_right(C, b)
    cnt+= in_a*(lenc-in_c)

print(cnt)
# Judge status: Accepted
S=str(input())
L=list(S)
x=len(L)
l=list()
for n in range(x-2):
  n=L[n:n+3]
  N=''.join(n)
  ans=abs(int(N)-753)
  l.append(ans)
print(min(l))
# Judge status: Accepted
def GCD(a, b):
    return GCD(b, a % b) if b else a
    
def LCM(a, b):
    return a // GCD(a, b) * b

n = int(input())
a = list(map(int, input().split()))

al = 1
for i in range(n):
    al = LCM(al, a[i])

ans = 0
for i in range(n):
    ans += al // a[i]

print(ans%1000000007)
# Judge status: Accepted
N = int(input())

A = [None] * N
B = [None] * N
for i in range(N):
    A[i], B[i] = map(int, input().split())

result = 0
for i in range(N - 1, -1, -1):
    t = (A[i] + result) % B[i]
    if t != 0:
        result += B[i] - t
print(result)
# Judge status: Wrong Answer
a, b, c = map(int,input().split())

if c > a and c < b:
  print ("Yes")
else:
  print ("No")
# Judge status: Wrong Answer
#整数の入力
N = int(input())

ans = 1


for i in range(N):
  ans = ans * (i%(10**9 + 7))
  

print(ans)
# Judge status: Accepted
N = int(input())
A = []
B = []
for i in range(N):
    x, y = map(int, input().split())
    A.append(x+y)
    B.append(x-y)
print(max(max(A)-min(A), max(B)-min(B)))
# Judge status: Accepted
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    A=list(map(int,input().split()))
    K=int(input())
    A.sort()
    print(A[-1]*2**K+sum(A[:2]))

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N,T=map(int,input().split())
a=1000
for i in range(N):
  c,t=map(int,input().split())
  if t<=T:
    if c<a:
      a=c
if a==1000:
  print("TLE")
else:
  print(a)
# Judge status: Accepted
A, B, C, K = [int(_) for _ in input().split()]

l = A + B + C - K

def solve(A, B, C, K):
    result = 0
    n = min(A, K)
    result += n
    K -= n
    A -= n
    if K == 0:
        return result
    n = min(B, K)
    K -= n
    B -= n
    if K == 0:
        return result
    n = min(C, K)
    result -= n
    K -= n
    C -= n
    return result

print(solve(A, B, C, K))
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline

n = int(input())
abc = [[int(x) for x in input().split()] for _ in range(n)]

dp = [[0] * 3 for _ in range(n)]
dp[0][0] = abc[0][0]
dp[0][1] = abc[0][1]
dp[0][1] = abc[0][2]

for i in range(1, n):
    a, b, c = abc[i]
    dp[i][0] = max(dp[i - 1][1] + a, dp[i - 1][2] + a)
    dp[i][1] = max(dp[i - 1][0] + b, dp[i - 1][2] + b)
    dp[i][2] = max(dp[i - 1][0] + c, dp[i - 1][1] + c)

print(max(dp[-1]))
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int,input().split()))

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

B.sort()

print(sum(B[0:N-K]))
# Judge status: Accepted
# https://atcoder.jp/contests/abc063/tasks/abc063_b
s = input()
t = set(s)
if len(s) == len(t):
    print('yes')
else:
    print('no')
# Judge status: Accepted
def main():
    n = int(input())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    for i in range(n-1):
        a[i+1] += a[i]
    for i in reversed(range(n-1)):
        b[i] += b[i+1]
    ans = 0
    for i in range(n):
        ans = max(ans, a[i]+b[i])
    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Accepted
def main():
  n = input()
  
  if n[0] == '7' or n[1] == '7' or n[2] == '7':
      print('Yes')
  else:
      print('No')
main()
# Judge status: Accepted
n=int(input())

a=[int(_) for _ in input().split()]
b=[int(_) for _ in input().split()]

m=sum(b)-sum(a)
l=0
for i in range(n):
  if a[i]<b[i]:
    l+= (b[i]-a[i]+1)//2
    
if l>m:
  print("No")
else:
  print("Yes")
# Judge status: Accepted
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def f(n, a):
    ans = 0
    while n > 0:
        ans += n % a
        n //= a
    return ans


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

    ans = INF
    for i in range(N + 1):
        ans = min(ans, f(i, 6) + f(N - i, 9))

    print(ans)
    return


if __name__ == '__main__':
    main()
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    s = input()
    weather = ['Sunny', 'Cloudy', 'Rainy', 'Sunny']
    print(weather[weather.index(s)+1])

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
a,b=map(int,input().split())
print(-(-(a+b)/2))
# Judge status: Wrong Answer
from itertools import accumulate
N, M = map(int, input().split())

left = 1
right = M

for i in range(M):
    a,b = map(int, input().split())
    left = max(left,a)
    right = min(right, b)

print(max(0,right-left+1))


# imos = [0] * (N + 2)
# for i in range(M):
#     l, r = map(int, input().split())
#     imos[l] += 1
#     imos[r + 1] -= 1
#
# imos = list(accumulate(imos))
#
# ans = 0
# for im in imos:
#     ans += (im == M)
#
# print(ans)
# Judge status: Accepted
N = int(input())
if N == 1:
    print(0)
else:
    print(1)
# Judge status: Accepted
n = int(input())
s = input()
t = input()

ans = ""
for i in range(n):
    if s[i] == t[0] and s[i:] == t[:n-i]:
        ans = s[:i]+t
        break
print(n*2 if ans=="" else len(ans))
# Judge status: Accepted
S = input()
if int(S[:4]) == 2019:
    if int(S[5:7]) == 4:
        if int(S[8:-1]) == 30:
            print('Heisei')
        elif int(S[8:-1]) >= 31:
            print('TBD')
        else:
            print('Heisei')
    elif int(S[5:7]) >= 5:
        print('TBD')
    else:
        print('Heisei')
elif int(S[:4]) >= 2020:
    print('TBD')
else:
    print('Heisei')
# Judge status: Accepted
a,b,c=map(int,input().split())
if a==b==c and a%2==0 and b%2==0 and c%2==0:
    print(-1)
else:
    ans=0
    while a%2==0 and b%2==0 and c%2==0:
        A=a
        B=b
        C=c
        a=B//2+C//2
        b=A//2+C//2
        c=B//2+A//2
        ans+=1
        if a==b==c:
            ans=-1
            break
    print(ans)
# Judge status: Accepted
def divs(num):
    ans = []
    for i in range(1,int(num**(1/2)+1)):
        if num%i == 0:
            ans += [i,num//i]
    return set(ans)
n = int(input())
a = list(map(int,input().split()))
fin = []
ans = [0]*(n+1)
for i in range(n,0,-1):
    # print(i,a[i-1],ans[i])
    if a[i-1]^ans[i]:
        fin += [i]
        div = divs(i)
        # print(div)
        for j in div:
            ans[j] ^= 1
print(len(fin))
print(*fin)
# Judge status: Wrong Answer
N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]


MOD = 1000000007

d = [0] * (N+1)
d[0] = 1
d[1] = 1

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

print(d[-1] % MOD)
# Judge status: Wrong Answer
n=int(input())
mod=10**9+7

print(pow(10,n,mod)-pow(9,n,mod)-pow(9,n,mod)+pow(8,n,mod))
# Judge status: Accepted
N, X = map(int, input().split(' '))
A = list(map(int, input().split(' ')))

cost = max(0, A[0] + A[1] - X)
A[1] = max(0, A[1] - cost)

for i in range(2, N):
    cost += max(0, A[i - 1] + A[i] - X)
    A[i] = max(0, A[i] - max(0, A[i - 1] + A[i] - X))

print(cost)
# Judge status: Accepted
A, B, K = map(int, input().split())
for x in range(A, A+K):
  if x<=B: print(x)

for x in range(max(x+1, B-K+1), B+1):
  if x>=A: print(x)
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
ans=0
for i in range(len(C)):
  ans = ans+B[A[i]-1]
  if i>0:
    if A[i]==A[i-1]+1:
      ans = ans+C[A[i-1]-1]
print(ans)
# Judge status: Accepted
N = input()
A = list(map(int, input().split()))

set_A = set(A)
if len(A)==len(set_A):
    print('YES')
else:
    print('NO')
# Judge status: Accepted
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

if N <= K:
  print(N * X)
else:
  print(K * X + (N - K) * Y)
# Judge status: Accepted
N = int(input())
ans = 0
for i in range(N+1):
    if i % 3 == 0:
        continue
    if i % 5 == 0:
        continue
    ans += i
print(ans)
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))
A.sort()
A.reverse()
h=int(0)
w=int(0)
i=int(1)
while i<n:
    if A[i]==A[i-1] and h==0:
        h=A[i]
        i+=1
    elif A[i]==A[i-1] and w==0:
        w=A[i]
        i+=1
    i+=1
print(h*w)
# Judge status: Wrong Answer
w,a,b=map(int,input().split())
print(max(0,b-a-w))
# Judge status: Accepted
N,M = map(int, input().split())

if M >= 2*N:
    ans = N
    M -= 2*N
    ans += M//4
else:
    ans = M//2
print(ans)
# Judge status: Accepted
n, *a = map(int, open(0).read().split())

a.sort(reverse=True)

width = 0
length = 0
flg = False
cnt = 0
for i in range(n - 1):
    if flg:
        flg = False
        continue
    
    if a[i] == a[i + 1]:
        if cnt == 0:
            width = a[i]
        elif cnt == 1:
            length = a[i]
            break
        
        flg = True
        cnt += 1

print(width * length)
# Judge status: Wrong Answer
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a+b<=c:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
#071 b-not found
#A~ 65 65+26 a~97 97+26
s=input()
a=[chr(i) for i in range(97,97+26)]
for i in range(26):
    if a[i] not in s:
        ans=i
        break
print(chr(97+i))
# Judge status: Wrong Answer
H = int(input())

count = 0
while H > 1:
    if H%2 == 0:
        H = H/2
    else:
        (H+1)/2
    count += 1
print(2**(count-1)+2**count)
# Judge status: Accepted
x,y,z=map(int,input().split())
if x+y==z or y+z==x or z+x==y:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import math

N=int(input())
count=[0]*(N+1)
for i in range(N):
  for x in range(1,int(math.sqrt(N+1)/3)):
    for y in range(1,int(math.sqrt(N+1)/3)):
      for z in range(1,int(math.sqrt(N+1)/3)):
        if(x**2+y**2+z**2+x*y+y*z+z*x==i):
          count[i]+=1
for j in range(1,N+1):
  print(count[j])
# Judge status: Accepted
a,b,c=map(int,input().split())
if b-a == c-b:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
d =int(input())

for i in range(d):
    print(17)
# Judge status: Accepted
n, m, x, y = map(int, input().split())
lx = list(map(int, input().split()))
ly = list(map(int, input().split()))
lx.append(x)
ly.append(y)
lx.sort()
ly.sort()

if lx[-1] < ly[0]:
        print('No War')
else:
    print('War')
# Judge status: Wrong Answer
n, m = map(int, input().split())
XY = list(map(int, input().split()) for _ in range(m))

Ball = [0] * n
Done = [False] * n
Ball[0] = 1
Done[0] = True

for i in range(m):
	x, y = XY[i]
	x -= 1
	y -= 1
	if Ball[x] >= 1:
		if Done[y] == False:
			Ball[x] -= 1
			Ball[y] = 2
			Done[y] = True
		else:
			Ball[x] -= 1
			Ball[y] += 1

res = 0
for i in range(n):
	if Ball[i] != 0:
		res += 1

print(res)
# Judge status: Wrong Answer
a,b = map(int, input().split())
if a>0 and b>0:
    print("Positive")
elif a<=0 and b>=0:
    print("Zero")
elif a<0 and b<0:
    print("Negative")