Harryxun/stf_run huggingface dataset:
max=0
k=0
N=int(input())
for i in range(1,N+1):
    p=int(input())
    if p>max:max=p
    k=k+p
    print((k-max)+(max//2))

### FIXED CODE ###

d=int(input())
print("Christmas"," Eve"*(25-d))
a,b,c,d=input()
print("Yes" a==b==c else b==c==d "No")

### FIXED CODE ###

a,b,c,d=input()
print("Yes" if a==b==c or b==c==d else "No")
N=int(input())
s=[int(input()) for _ in range(N)]
M=int(input())
t=[int(input()) for _ in range(M)]
l=set(s)
List=[s.count(l[i])-t.count(l[i]) for i in range(len(l))]
print(max(0,max(List)))

### FIXED CODE ###

N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
l=list(set(s))
List=[s.count(l[i])-t.count(l[i]) for i in range(len(l))]
print(max(0,max(List)))
k=int(input())

keta=1
total=9
while total<=k:
  keta+=1
  total*=3

if keta==1:
  print(k)
  exit()
ans=''
num=1
k-=9*3**(keta-2)
while k-(3**(keta-1))>0:
  k-=3**(keta-1)
  num+=1
else:
  ans+=str(num)
  keta-=1

while keta>0:
  san=ans[-1]
  for i in range(4):
    if k>=3**(keta-1):
      k-=3**(keta-1)
    else:
      ans+=str(int(san)+i-2)
      break

  keta-=1

print(int(ans))

### FIXED CODE ###

k=int(input())

def dfs(keta, val):
  lunlun.append(val)

  if keta==10:
    return

  for i in range(-1,2):
    add=(val%10)+i
    if 0<=add<=9:
      dfs(keta+1, val*10+add)

lunlun=[]
for i in range(1,10):
  dfs(1, i)

lunlun.sort()
print(lunlun[k-1])
n = int(input())
x = input()
d = [0] * n
t = x.count('1')
a = 0
b = 0
for i in range(n):
    a *= 2
    b *= 2
    if x[i] == '1':
        a += 1
        b += 1
    a %= t + 1
    b %= t - 1
for i in range(n):
    if x[i] == '1':
        d[i] = (b - pow(2, n - i - 1, t - 1)) % (t - 1)
    else:
        d[i] = (a + pow(2, n - i - 1, t + 1)) % (t + 1)
if t == 1:
    for i in range(n):
        if x[i] == '1':
            print(0)
        else:
            p = d[i]
            for p in d:
                ans = 1
                while p > 0:
                    p %= bin(p).count('1')
                    ans += 1
                print(ans)
else:
    for p in d:
        ans = 1
        while p > 0:
            p %= bin(p).count('1')
            ans += 1
        print(ans)


### FIXED CODE ###

n = int(input())
x = input()
d = [0] * n
t = x.count('1')
a = 0
b = 0


if t == 1:
    for i in range(n):
        d[i] = (a + pow(2, n - i - 1, t + 1)) % (t + 1)
    for i in range(n):
        a *= 2
        if x[i] == '1':
            a += 1
        a %= t + 1
    for i in range(n):
        if x[i] == '1':
            print(0)
        else:
            p = d[i]
            ans = 1
            while p > 0:
                p %= bin(p).count('1')
                ans += 1
            print(ans)
else:
    for i in range(n):
        a *= 2
        b *= 2
        if x[i] == '1':
            a += 1
            b += 1
        a %= t + 1
        b %= t - 1
    for i in range(n):
        if x[i] == '1':
            d[i] = (b - pow(2, n - i - 1, t - 1)) % (t - 1)
        else:
            d[i] = (a + pow(2, n - i - 1, t + 1)) % (t + 1)
    for i in range(n):
        a *= 2
        b *= 2
        if x[i] == '1':
            a += 1
            b += 1
        a %= t + 1
        b %= t - 1
    for p in d:
        ans = 1
        while p > 0:
            p %= bin(p).count('1')
            ans += 1
        print(ans)
n,k=map(int,input().split())
s=list(input())
point=s[0]
count=0
while k!=0:
    if s[count]!=point:
        while True:
            if s[count]!=point:
                s[count]=point
                count +=1
            else:break
        k -=1
    else:count +=1

ans=0
for i in range(n-1,0,-1):
    if s[i]==s[i-1]:
        ans +=1
print(ans)

### FIXED CODE ###

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

s = input()

S = list(s)

num = 0
for i in range(N-1):

    if S[i] == S[i+1]:
        num += 1

print (min(N-1,num + 2*K))
n = int(input())
A = list(map(int, input().split()))
mina = 10*10
minus = False
sumA = 0
for a in A:
    if a < 0:
        if minus:
            minus = False
        else:
            minus = True
    	a = -a
    sumA += a
    mina = min(a, mina)


if minus:
    sumA -= 2*mina
print(sumA)

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
mina = abs(A[0])
minus = 0
sumA = 0
for a in A:
    if a < 0:
        minus += 1
        a = -a
    sumA += a
    mina = min(a, mina)
if minus % 2 == 1:
    sumA -= 2 * mina
print(sumA)
# -*- coding: utf-8 -*-
import math
n, m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))

tmp = 0
dp = [0 for _ in range(n)]
if 1 == a[tmp]:
    dp[0] = 0
    tmp += 1
else:
    dp[0] = 1
if n >= 2 and 2 == a[tmp]:
    dp[1] = 0
    tmp += 1
else:
    dp[1] = dp[0] + 1

for i in range(2, n):
    if tmp < m and i + 1 == a[tmp]:
        dp[i] = 0
        tmp += 1
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % (pow(10, 9) + 7)
#print(dp)
print(dp[n - 1] % (pow(10, 9) + 7))

### FIXED CODE ###

# -*- coding: utf-8 -*-
import math
n, m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))

if m == 0:
    dp = [0 for _ in range(n)] #i + 1段目に登る方法の数
    dp[0] = 1
    if n >= 2:
        dp[1] = 2
    for i in range(2, n):
        dp[i] = (dp[i - 1] + dp[i - 2]) % (pow(10, 9) + 7)
    print(dp[n - 1])
    exit()

tmp = 0
dp = [0 for _ in range(n)]
if 1 == a[tmp]:
    dp[0] = 0
    tmp += 1
else:
    dp[0] = 1
if n >= 2 and tmp < m and 2 == a[tmp]:
    dp[1] = 0
    tmp += 1
elif n >= 2 and (tmp >= m or 2 != a[tmp]):
    dp[1] = dp[0] + 1

for i in range(2, n):
    if tmp < m and i + 1 == a[tmp]:
        dp[i] = 0
        tmp += 1
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % (pow(10, 9) + 7)
#print(dp)
print(dp[n - 1] % (pow(10, 9) + 7))
letters="abcdefghijklmnopqrstuvwxyz"
ans=sorted(set(letters)^set(input)())
print("None" if len(ans)==0 else ans[0])

### FIXED CODE ###

letters="abcdefghijklmnopqrstuvwxyz"
ans=sorted(set(letters)^set(input()))
print("None" if len(ans)==0 else ans[0])
import numpy as np
import sys
input = sys.stdin.readline

num_str = input()

num_list = np.array([int(num_str[i]) for i in range(len(num_str))])

num_sum = np.sum(num_list)

if num_sum%9 == 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import numpy as np
import sys
# input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
 
num_str = input()

num_sum = 0
for i in range(len(num_str)):
  num_sum+=int(num_str[i])
 
if num_sum%9 == 0:
  print("Yes")
else:
  print("No")
for i in range(1, len(s)):
    if s[i] == 'B':
        continue
    else:
        if s[i - 1] != 'B':
            ans += s[i - 1]
if s[-1] != 'B':
    ans += s[-1]

print(ans)

### FIXED CODE ###

s = input()

pos = s.find('B')
while pos > -1:
    if pos == 0:
        s = s[1:]
    elif pos == len(s) - 1:
        s = s[0:pos - 1]
    else:
        s = s[0:pos - 1] + s[pos + 1:]
    pos = s.find('B')
print(s)
N = int(input())
A = list(map(int,input().split()))
A.sort()
nega = []
for i in range(N):
    if A[0] < 0:
        nega.append(A.pop(0))
    else:
        break
N = len(A)
print( sum(A[N//2:]) - sum(A[:N//2]) - sum(nega))
B = [0]*N
l,r = 0,N-1
for i in range(N):
    if i%2 == 0:
        B[i] = A[r]
        r -= 1
    else:
        B[i] = A[l]
        l += 1
hoge = B[-1]
for i in range(N-1):
    print(B[N-i-2],hoge)
    hoge = B[N-i-2]-hoge
for i in nega:
    print(hoge,i)
    hoge -= i

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
A.sort()
ans = 0
hoge = sum(A)
p = 0
for i in range(N-1):
    hoge -= A[i]*2
    if hoge > ans:
        ans = hoge
        p = i
print(ans)
hoge = A[0]
for i in range(p+1,N-1):
    print(hoge,A[i])
    hoge -= A[i]
print(A[N-1],hoge)
hoge = A[N-1] - hoge
for i in range(1,p+1):
    print(hoge,A[i])
    hoge -= A[i]
a,b,c,d,e,f= map(int, input().split())
2.youeki=0
3.yousitu=0
4.noudo=0
5.n_a=int(f/(100*a))
6. 
7. 
8.for i in range(1+n_a):
9. for j in range(1+int((f-100*i*a)/(100*b))):
10.  for k in range(1+int((f-100*i*a-100*j*b)/c)):
11.   for l in range(1+int((f-100*i*a-100*j*b-k*c)/d)):
12.    S=100.0*a*i+100.0*b*j+c*k+d*l
13.    T=c*k+d*l
14.    if S!=0:
15.     L=100.0*T/S
16.     if S<=f and L<=100*e/(100+e) and L>=noudo:
17.      noudo=L
18.      youeki=S
19.      yousitu=T
20.print(int(youeki),int(yousitu))


### FIXED CODE ###

a,b,c,d,e,f= map(int, input().split())
youeki=0
yousitu=0
noudo=0
n_a=int(f/(100*a))


for i in range(2+n_a):
 for j in range(2+int((f-100*i*a)/(100*b))):
  for k in range(2+int((f-100*i*a-100*j*b)/c)):
   for l in range(2+int((f-100*i*a-100*j*b-k*c)/d)):
    S=100.0*a*i+100.0*b*j+c*k+d*l
    T=c*k+d*l
    if S!=0:
     L=100.0*T/S
     if S<=f and L<=100*e/(100+e) and L>=noudo:
      noudo=L
      youeki=S
      yousitu=T
print(int(youeki),int(yousitu))
# -*- coding: utf-8 -*-

a,b,c = map(int, raw_input().split())
if a <= c and b >= c:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

# -*- coding: utf-8 -*-

def Judge(a, b, c):
    if a > c:
        return 'No'
    elif c > b:
        return 'No'
    else:
        return 'Yes'

a,b,c = map(int, input().split())
print(Judge(a,b,c))
from sys import stdin, stdout
from collections import defaultdict
def readLine_int_list(): return list(map(int, stdin.readline().split()))
def readAll_int(): return list(map(int, stdin))

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

def main():
    n = int(input())
    # t = sorted(list(set(readAll_int())))
    t = readAll_int()
    for i in range(len(t) - 1):
        a = lcm(t[i], t[i+1])
        t[i+1] = a
    print(a)

if __name__ == "__main__":
    main()


### FIXED CODE ###

from sys import stdin, stdout
def readAll_int(): return list(map(int, stdin))

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

def main():
    n = int(input())
    t = list(set(readAll_int()))
    if len(t)>1:
        for i in range(len(t) - 1):
            a = lcm(t[i], t[i+1])
            t[i+1] = a
    else:
        a = t[0]
    print(a)
    
if __name__ == "__main__":
    main()
li=[input() for i in range(4)]

while ((li[0]>0) and (li[2]>0)):
  li[2]=li[2]-li[1]
   if li[2]<=0:
      print('Yes')
  li[0]=li[0]-li[3]
   if li[0]<=0:
      print('No')


### FIXED CODE ###

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

A=li[0]
B=li[1]
C=li[2]
D=li[3]

while ((A>0) and (C>0)) :
  C=C-B
  if C<=0:
    print('Yes')
    break
  A=A-D
  if A<=0:
    print('No')
    break
a,b=input(),split()
c=int(a,16)
d=int(b,16)
print('>' if c>d else '<' if c<d else '=')

### FIXED CODE ###

a,b=input().split()
c=int(a,16)
d=int(b,16)
print('>' if c>d else '<' if c<d else '=')
def dfs(u):
    if(dp[u]!=-1):
        return dp[u]
    for i in d[u]:
        if(dp[i]!=-1):
            dp[u]=max(dp[u],dp[i]+1)
        else:
            dp[u]=max(dp[u],dfs(i)+1)
    return max(dp[u],0)
from collections import defaultdict as dd
n,m=map(int,input().split())
d=dd(list)
for i in range(m):
    u,v=map(int,input().split())
    d[u].append(v)
dp=dd(lambda: -1)
mx=0
for i in range(1,n+1):
    if(dp[i]==-1):
        dp[i]=dfs(i)
    mx=max(mx,dp[i])
print(mx)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
def dfs(u):
    if(dp[u]!=-1):
        return dp[u]
    for i in d[u]:
        if(dp[i]!=-1):
            dp[u]=max(dp[u],dp[i]+1)
        else:
            dp[u]=max(dp[u],dfs(i)+1)
    return max(dp[u],0)
from collections import defaultdict as dd
n,m=map(int,input().split())
d=dd(list)
for i in range(m):
    u,v=map(int,input().split())
    d[u].append(v)
dp=dd(lambda: -1)
mx=0
for i in range(1,n+1):
    if(dp[i]==-1):
        dp[i]=dfs(i)
    mx=max(mx,dp[i])
print(mx)
import sys
import bisect
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce


def permutation(n, r):
    if r == 0:
        return 1
    else:
        return reduce(mul, range(n, n - r, -1))


def combination(n, r):
    r = min(n - r, r)
    if r == 0:
        return 1
    else:
        return reduce(mul, range(n, n - r, -1)) // reduce(mul, range(1, r + 1))


def fermat_s_little_theorem(denominator_no, molecule_no1, molecule_no2, mod):
    denominator = 1
    for i in range(1, denominator_no + 1):
        denominator = (denominator * i) % mod
    molecule = 1
    for i in range(1, molecule_no1 + 1):
        molecule = (molecule * i) % mod
    for i in range(1, molecule_no2 + 1):
        molecule = (molecule * i) % mod
    return denominator * pow(molecule, mod - 2, mod) % mod


def slove():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
        print(combination(n - k + 1, i) % mod * combination(k-1, i-1) % mod)


if __name__ == '__main__':
    slove()


### FIXED CODE ###

import sys
import bisect
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce


def permutation(n, r):
    if r == 0:
        return 1
    else:
        return reduce(mul, range(n, n - r, -1))


def combination(n, r):
    r = min(n - r, r)
    if r == 0:
        return 1
    else:
        return reduce(mul, range(n, n - r, -1)) // reduce(mul, range(1, r + 1))


def fermat_s_little_theorem(denominator_no, molecule_no1, molecule_no2, mod):
    denominator = 1
    for i in range(1, denominator_no + 1):
        denominator = (denominator * i) % mod
    molecule = 1
    for i in range(1, molecule_no1 + 1):
        molecule = (molecule * i) % mod
    for i in range(1, molecule_no2 + 1):
        molecule = (molecule * i) % mod
    return denominator * pow(molecule, mod - 2, mod) % mod


def slove():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n, k = list(map(int, input().rstrip('\n').split()))
    for i in range(1, k + 1):
        if k - 1 >= i - 1 and n - k + 1 >= i:
            print(combination(n - k + 1, i) % mod * combination(k-1, i-1) % mod)
        else:
            print(0)


if __name__ == '__main__':
    slove()
a, b = map(int, input().split())
from math import gcd
print(a*b // gcd(a, b))

### FIXED CODE ###

a, b = map(int, input().split())
from fractions import gcd
print(a*b // gcd(a, b))
a, b, q = map(int, input().split())
sno = []
tno = []
dis = []
 
for i in range(a):
  sno.append(int(input()))
sno.append(10000)
 
for i in range(b):
  tno.append(int(input()))
tno.append(10000)
  
for i in range(q):
  dis.append(int(input()))

for i in range(q):
  sl = 0
  sr = 0
  tl = 0
  tr = 0
  
  for j in range(a):
    if sno[j] <= dis[i]:
      sl = dis[i] - sno[j]
      sr = sno[j+1] - dis[i]
      break
    else:
      pass
    
  for k in range(b):
    if tno[k] <= dis[i]:
      tl = dis[i] - tno[k]
      tr = tno[k+1] - dis[i]
      break
    else:
      pass
  
  lds = max(sl, tl)
  rds = max(sr, tr)
  dis = min(lds, rds)
  print(dis)


### FIXED CODE ###

date = input()
tdate=[]
 
for s in date:
  tdate.append(s)
  
if tdate[5] != "0":
  mon = int(tdate[5] + tdate[6])
else:
  mon = int(tdate[6])


if mon <= 4:
  print("Heisei")
else:
  print("TBD")
import math
n = int(input())
ans = 0
for i in range(1,math.floor(math.sqrt(n))+1):
    if n % i == 0:
        num = (n//i)-1
        if n // num == n % num:
            ans += num
print(ans)

### FIXED CODE ###

import math
n = int(input())
ans = 0
for i in range(1,math.floor(math.sqrt(n))+1):
    if n % i == 0:
        num = (n//i)-1
        if num > 0:
            if n // num == n % num:
                ans += num
print(ans)
n=int(input())
a=map(int,input().split())
loop=True
cnt=0
while True:
    for i in range(n):
        if a[i]%2==0:
            a[i]=a[i]/2
        else:
          loop=False
          break
    cnt=cnt+1
print(cnt)


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
loop=True
cnt=0
while loop:
    for i in range(n):
        if a[i]%2==0:
            a[i]=a[i]/2
        else:
          loop=False
          break
    cnt=cnt+1
print(cnt-1)
a, b=input().split()
 
print(min(a*(int(b)),b*(int(a) ) )

### FIXED CODE ###

N,M=map(int,input().split())
print("Yes" if N==M else "No")
import sys

n = int(sys.argv[1])
total = 0

for i in range(n):
	if (i % 3 != 0) and (i % 5 != 0):
		total += i

print(total)

### FIXED CODE ###

n = int(input())
total = 0

for j in range(n):
	i = j+1
	if (i % 3 != 0) and (i % 5 != 0):
		total += i

print(total)
canChange = {alphabet:True alphabet in "abcedfghijklmnopqrstuvwxyz"}
 
s = str(input())
t = str(input())
 
for i in s:
  if !canChange[s[i]]:
    print("No")
    break
  elif s[i]!=t[i]:
    t.replace(t[i], s[i])
    canChange[t[i]] = False
  else: #s[i]==t[i]:
    canChange[t[i]] = False
    continue
    
return("Yes")

### FIXED CODE ###

table = {alphabet: "-" for alphabet in "abcedfghijklmnopqrstuvwxyz"}
rev_table = {alphabet: "-" for alphabet in "abcedfghijklmnopqrstuvwxyz"}

s = str(input())
t = str(input())

flag = True

for i in range(len(s)):
    if table[s[i]] == t[i]:
        continue
    elif table[s[i]] == "-":
        table[s[i]] = t[i]
    else:
        flag = False
        break

for i in range(len(t)):
    if rev_table[t[i]] == s[i]:
        continue
    elif rev_table[t[i]] == "-":
        rev_table[t[i]] = s[i]
    else:
        flag = False
        break

if flag is True:
    print("Yes")
else:
    print("No")
# Widespread
n,a,b = list(map(int, input().split()))
h = []
for i in range(n):
    h.append(int(input()))
    
import math as m

def check(ary, num, a, b):
    bommed = [(hi- b*num) for hi in h if (hi- b*num)>0]
    acnt = sum([m.ceil(hi/(a-b)) for hi in bommed])
    if acnt > num:
        return "NO"
    else:
        return "YES"

imin = 1
imax = m.ceil(max(nh)/a)

while ( imax > imin+1 ):
    imid = imin + (imax-imin)//2
    if ( check(h, imid, imin, imax)=="YES" ):
        imax = imid
    else:
        imin = imid
print(imax)

### FIXED CODE ###

n,a,b = list(map(int, input().split()))
h = []
for i in range(n):
    h.append(int(input()))

import math

sup = sum([hh // a + 1 for hh in h])
inf = 1
 
while sup - inf > 1:
    x = (sup + inf) // 2
    c = sum([math.ceil((hh - x * b)/(a-b)) for hh in h if hh > x * b])
    if c <= x:
        sup = x
    else:
        inf = x
 
print(sup)
k,s = map(int, input().split())

count = 0

for x in range(k+1):
  for y in range(k+1):
    z = S - (x + y)
    
    if 0 <= z <= k:
      count += 1
      
print(count)

### FIXED CODE ###

k,s = map(int, input().split())

count = 0

for x in range(k+1):
  for y in range(k+1):
    z = s - (x + y)
    
    if 0 <= z <= k:
      count += 1
      
print(count)
l, r = map(int, input().split())
m = 2019
l, r = l%m, l%m+(r-l)
if r-l >= m-1:
    print(0)

mi = 2018
else:
    for i in range(l, r):
        for j in range(i+1, r+1):
            m = (i*j)%2019
            mi = min(m, mi)
    print(mi)


### FIXED CODE ###

l, r = map(int, input().split())
m = 2019
l, r = l%m, l%m+(r-l)
if r-l >= m-1:
    print(0)

else:
    mi = 2018
    for i in range(l, r):
        for j in range(i+1, r+1):
            m = (i*j)%2019
            mi = min(m, mi)
    print(mi)
N, M = map(int, input().split())
a = set([int(input()) for i in range(M)])
n = [0] * N
n[0] = 1
n[1] = 2

#listの中をinで探すのはくっそ遅い
if 1 in a and N == 1:
    print(0)
    exit()
if 1 in a and 2 in a:
    print(0)
    exit()
if 1 in a:
    n[0] = 0
    n[1] = 1

for i in range(N - 2):
    if i + 3 in a:
        pass
    else:
        n[i + 2] = (n[i + 1] + n[i]) % 1000000007

print(n[N - 1])

### FIXED CODE ###

N, M = map(int, input().split())
a = set([int(input()) for i in range(M)])
n = [0] * (N + 1)
n[0] = 1
n[1] = 1

#listの中をinで探すのはくっそ遅い
if 1 in a:
    n[1] = 0

for i in range(2, N + 1):
    if i in a:
        continue
    else:
        n[i] = (n[i - 1] + n[i - 2]) % 1000000007

print(n[N])
a=input()
ans=0
n=list(map(int, input().split())
for i in n:
	ans += 1/i

print(1/ans)


### FIXED CODE ###

a=input()
ans=0
n=list(map(int, input().split()))
for i in n:
	ans += 1/i

print(1/ans)
N=int(input())
A=list(map(int,input().split()))
ans = 1
if 0 in A:
	print(0)
	return
else:
	for a in A:
    	ans *= a
    	if ans > 1000000000000000000:
      	print(-1)
      	return
	print(ans)


### FIXED CODE ###

def main ():
	N = int(input())
	A = list(map(int,input(). split ()))
	if 0 in A:
		print(0)
		return
	prod = 1
	for a in A:
		prod *= a
		if prod > 1000000000000000000:
			print(-1)
			return
	print(prod)
main ()
def main():
  X, Y, A, B, C  = map(int, input().split())
  aka_list = sorted([int(t) for t in input().split()],reverse=True)[:X]
  midori_list = sorted([int(t) for t in input().split()],reverse=True)[:Y]
  mu_list = sorted([int(t) for t in input().split()],reverse=True)
  
  j = 0
  sum_list = sorted(aka_list + midori_list)
  for i in range(len(sum_list)):
    if sum_list[i] < mu_list[j]:
      sum_list[i] = mu_list[j]
      j += 1
  print(sum(sum_list))
  
main()

### FIXED CODE ###

def main():
  X, Y, A, B, C  = map(int, input().split())
  aka_list = sorted([int(t) for t in input().split()],reverse=True)[:X]
  midori_list = sorted([int(t) for t in input().split()],reverse=True)[:Y]
  mu_list = sorted([int(t) for t in input().split()],reverse=True)
  
  sum_list = sorted(aka_list + midori_list + mu_list ,reverse=True)[:X+Y]
  print(sum(sum_list))

main()
N,W = map(int,input().split())
w = []
v = []
for _ in range(N):
    w_, v_ = map(int,input().split())
    w.append(w_)
    v.append(v_)

# dp[i][j]:iまでを用いて、重みjの時の最大値
dp = [[0]*(W+1) for _ in range(N+1)]

for i in range(N):
    for j in range(W+1):
        if w[i]<=j:
            dp[i+1][j] = max(dp[i][j], dp[i][j-w[i]]+v[i])
        dp[i+1][j] = max(dp[i][j], dp[i+1][j])
        
print(dp[N][W])

### FIXED CODE ###

N,W = map(int,input().split())
tmpv = [[] for _ in range(4)]
w1 = None
for i in range(N):
    tw, tv = map(int,input().split())
    if i==0:
        w1 = tw
        tmpv[0].append(tv)
    else:
        tmpv[tw-w1].append(tv)

v = []
for tv in tmpv:
    v.append(sorted(tv, reverse=True)+[0])
    
ans = 0
for i in range(len(v[0])):
  for j in range(len(v[1])):
    for k in range(len(v[2])):
      for l in range(len(v[3])):
        tw = w1*i+(w1+1)*j+(w1+2)*k+(w1+3)*l
        tv = sum(v[0][:i]) + sum(v[1][:j]) + sum(v[2][:k]) + sum(v[3][:l])
        if tw<=W:
          ans = max(ans, tv)
print(ans)