Do you know the story about the three musketeers? Anyway, you must help them now.

Richelimakieu is a cardinal in the city of Bearis. He found three brave warriors and called them the three musketeers. Athos has strength *a*, Borthos strength *b*, and Caramis has strength *c*.

The year 2015 is almost over and there are still *n* criminals to be defeated. The *i*-th criminal has strength *t*<sub class="lower-index">*i*</sub>. It's hard to defeat strong criminals — maybe musketeers will have to fight together to achieve it.

Richelimakieu will coordinate musketeers' actions. In each hour each musketeer can either do nothing or be assigned to one criminal. Two or three musketeers can be assigned to the same criminal and then their strengths are summed up. A criminal can be defeated in exactly one hour (also if two or three musketeers fight him). Richelimakieu can't allow the situation where a criminal has strength bigger than the sum of strengths of musketeers fighting him — a criminal would win then!

In other words, there are three ways to defeat a criminal.
 -  A musketeer of the strength *x* in one hour can defeat a criminal of the strength not greater than *x*. So, for example Athos in one hour can defeat criminal *i* only if *t*<sub class="lower-index">*i*</sub> ≤ *a*. -  Two musketeers can fight together and in one hour defeat a criminal of the strength not greater than the sum of strengths of these two musketeers. So, for example Athos and Caramis in one hour can defeat criminal *i* only if *t*<sub class="lower-index">*i*</sub> ≤ *a* + *c*. Note that the third remaining musketeer can either do nothing or fight some other criminal. -  Similarly, all three musketeers can fight together and in one hour defeat a criminal of the strength not greater than the sum of musketeers' strengths, i.e. *t*<sub class="lower-index">*i*</sub> ≤ *a* + *b* + *c*. 
Richelimakieu doesn't want musketeers to fight during the New Year's Eve. Thus, he must coordinate their actions in order to minimize the number of hours till all criminals will be defeated.

Find the minimum number of hours to defeat all criminals. If musketeers can't defeat them all then print "-1" (without the quotes) instead.
The first line of the input contains a single integer *n* (1 ≤ *n* ≤ 200 000) — the number of criminals.

The second line contains three integers *a*, *b* and *c* (1 ≤ *a*, *b*, *c* ≤ 10<sup class="upper-index">8</sup>) — strengths of musketeers.

The third line contains *n* integers *t*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub>, ..., *t*<sub class="lower-index">*n*</sub> (1 ≤ *t*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">8</sup>) — strengths of criminals.
In the first sample Athos has strength 10, Borthos 20, and Caramis 30. They can defeat all criminals in two hours:
 -  Borthos and Caramis should together fight a criminal with strength 50. In the same hour Athos can fight one of four criminals with strength 1. -  There are three criminals left, each with strength 1. Each musketeer can fight one criminal in the second hour. 
In the second sample all three musketeers must together fight a criminal with strength 51. It takes one hour. In the second hour they can fight separately, each with one criminal. In the third hour one criminal is left and any of musketeers can fight him.
5
10 20 30
1 1 1 1 50
2
5
10 20 30
1 1 1 1 51
3
7
30 20 10
34 19 50 33 88 15 20
-1
6
10 5 10
10 9 5 25 20 5
3
9
10 20 30
5 5 5 5 5 5 45 45 45
4
3
1 1 1
2 2 2
3
3
2 2 2
1 1 1
1
20
43 36 6
6 49 22 40 17 48 44 19 26 38 23 2 19 31 48 25 11 2 6 4
8
15
3 46 35
16 34 37 33 47 4 3 36 20 43 17 2 24 10 30
7
30
34938093 71279712 25853338
29827587 21741565 52179990 30235076 83272806 10815432 98887688 94542207 99870240 97586453 21739186 30460781 75347784 50711354 12162179 74306503 97398492 88466481 52489587 67579359 53177356 75077523 86044366 14405531 73916272 78242091 49321886 41937821 89258359 51438752
18
5
85660180 78921313 51382024
32512548 57103200 41738413 42188816 57569714
2
1
1 1 1
1
1
1
1 1 1
100000000
-1
1
100000000 100000000 100000000
1
1
1
100000000 100000000 100000000
100000000
1
4
6 7 8
8 8 8 12
2
#!/usr/bin/env python3

N = int(input())
A, B, C = sorted(map(int, input().split()))
criminals = sorted(map(int, input().split()))

strengths = [A, B, C, A+B, A+C, B+C, A+B+C]
counts = [0, 0, 0, 0, 0, 0, 0]

def getStrengthCount(n):
    for i, s in enumerate(strengths):
        if n <= s:
            return i
    return -1

for c in criminals:
    sc = getStrengthCount(c)
    if sc == -1:
        print(-1)
        exit()
    counts[sc] += 1

# 6 can't be distributed
result = counts[6]
#print(counts)

# distribute 0,1,2 to 3,4,5
for take in range(5, 2, -1):
    temp = counts[take]
    match = 0
    for steal in range(5 - take, 3):
        if temp - match == 0:
            break
        transfer = min(temp - match, counts[steal])
        counts[steal] -= transfer
        match += transfer
    result += temp


def distributeTwo(a, b):
    if counts[a] > counts[b]:
        transfer = (counts[a] - counts[b] + 1)//2
        counts[b] += transfer
        counts[a] -= transfer
        return transfer
    return 0

while True:
    blah2 = distributeTwo(1, 2)
    blah1 = distributeTwo(0, 1)
    if blah1 == 0 and blah2 == 0:
        break
result += max(counts[0:3])

#print(counts)
print(result)
