892_A. Greed_10341
Jafar has n cans of cola. Each can is described by two integers: remaining volume of cola ai and can's capacity bi (ai ≤  bi).

Jafar has decided to pour all remaining cola into just 2 cans, determine if he can do this or not!

Input

The first line of the input contains one integer n (2 ≤ n ≤ 100 000) — number of cola cans.

The second line contains n space-separated integers a1, a2, ..., an (0 ≤ ai ≤ 109) — volume of remaining cola in cans.

The third line contains n space-separated integers that b1, b2, ..., bn (ai ≤ bi ≤ 109) — capacities of the cans.

Output

Print "YES" (without quotes) if it is possible to pour all remaining cola in 2 cans. Otherwise print "NO" (without quotes).

You can print each letter in any case (upper or lower).

Examples

Input

2
3 5
3 6


Output

YES


Input

3
6 8 9
6 10 12


Output

NO


Input

5
0 0 5 0 0
1 1 8 10 5


Output

YES


Input

4
4 1 0 3
5 2 2 3


Output

YES

Note

In the first sample, there are already 2 cans, so the answer is "YES".
import sys
sys.setrecursionlimit(100000000)
# def input(): return sys.stdin.readline()[:-1]
def iin(): return int(input())
def impin(): return map(int, input().split())
def irrin(): return [int(x) for x in input().split()]
def imrin(n): return [int(input()) for _ in range(n)]


n = iin()
arr = irrin()
brr = irrin()
brr.sort(reverse=True)
if sum(arr)<=brr[0]+brr[1]:
    print("YES")
else:
    print('NO')

4
4 1 0 3
5 2 2 3
 3
6 8 9
6 10 12
 5
0 0 5 0 0
1 1 8 10 5
 2
3 5
3 6
 4
1 0 0 0
2 0 0 0
 2
2 5
2 5
 2
0 0
1 2
 5
32 4 22 40 26
39 20 36 98 44
 6
18 25 3 10 13 37
38 73 19 35 24 37
 2
1000 1008
10000 2352
 4
25 35 7 31
70 37 43 35
 5
1 1 2 3 1
1 1 2 3 4
 5
22 5 19 16 32
26 10 43 38 37
 10
15 26 15 14 14 39 40 4 25 39
27 72 16 44 69 48 53 17 63 42
 3
5 1 1
5 5 5
 2
0 0
0 0
 5
1 2 3 4 5
1 2 3 4 11
 10
9 10 24 11 1 7 8 3 28 14
86 20 34 11 22 94 8 16 73 85
 2
0 0
1 1
 2
2 2
2 2
 3
9 13 4
10 14 5
 2
2 0
2 5
 5
1 1 2 3 1
1 1 1 3 4
 5
32 4 22 40 26
39 20 36 98 77
 6
18 25 3 10 13 37
38 73 19 35 31 37
 2
1000 617
10000 2352
 5
37 5 19 16 32
26 10 43 38 37
 10
15 26 15 14 14 39 40 5 25 39
27 72 16 44 69 48 53 17 63 42
 3
5 1 1
10 5 5
 2
0 0
1 0
 5
1 2 3 4 5
1 2 3 4 19
 10
9 10 24 11 1 7 8 3 55 14
86 20 34 11 22 94 8 16 73 85
 3
8 13 4
10 14 5
 4
2 1 0 3
5 2 2 3
 3
6 8 9
6 0 12
 5
0 0 5 0 0
2 1 8 10 5
 2
3 5
3 11
 2
2 0
2 1
 5
32 4 22 40 26
39 20 36 155 77
 2
1010 617
10000 2352
 5
37 5 19 16 24
26 10 43 38 37
 10
15 26 15 14 14 39 40 5 25 39
27 72 16 44 69 48 53 11 63 42
 3
5 1 1
10 1 5
 5
2 2 3 4 5
1 2 3 4 19
 10
9 10 46 11 1 7 8 3 55 14
86 20 34 11 22 94 8 16 73 85
 3
0 13 4
10 14 5
 4
2 1 0 3
9 2 2 3
 3
6 14 9
6 0 12
 2
3 5
5 11
 2
2 1
2 1
 5
32 4 35 40 26
39 20 36 155 77
 2
1010 617
10000 4337
 5
37 5 19 16 24
26 10 43 58 37
 10
15 26 15 14 14 39 40 5 25 64
27 72 16 44 69 48 53 11 63 42
 3
5 1 2
10 1 5
 5
2 2 3 4 6
1 2 3 4 19
 10
9 10 46 3 1 7 8 3 55 14
86 20 34 11 22 94 8 16 73 85
 4
2 1 0 3
9 3 2 3
 3
6 14 9
8 0 12
 2
3 8
5 11
 2
2 1
2 2
 5
32 4 35 33 26
39 20 36 155 77
 2
1110 617
10000 4337
 5
37 5 19 16 24
26 6 43 58 37
 10
15 26 15 14 14 39 40 1 25 64
27 72 16 44 69 48 53 11 63 42
 3
5 1 2
10 1 8
 5
2 2 1 4 6
1 2 3 4 19
 4
2 1 0 3
4 3 2 3
 3
6 14 9
8 0 0
 2
5 8
5 11
 2
2 0
2 2
 5
32 4 35 33 12
39 20 36 155 77
 2
1110 1074
10000 4337
 5
57 5 19 16 24
26 6 43 58 37
 10
15 26 15 14 14 39 40 0 25 64
27 72 16 44 69 48 53 11 63 42
 3
5 1 2
4 1 8
 5
2 2 1 4 6
1 0 3 4 19
 4
2 0 0 3
4 3 2 3
 3
6 14 9
4 0 0
 2
5 8
5 13
 2
3 0
2 2
 5
32 4 56 33 12
39 20 36 155 77
 2
1110 1074
00000 4337
 5
57 5 11 16 24
26 6 43 58 37
 10
15 26 15 14 14 39 40 0 25 64
27 93 16 44 69 48 53 11 63 42
 3
5 1 2
2 1 8
 5
2 2 0 4 6
1 0 3 4 19
 4
2 0 0 3
4 6 2 3
 3
6 8 9
4 0 0
 2
6 8
5 13
 2
0 0
2 2
 5
32 4 56 33 12
39 20 24 155 77
 2
1010 1074
00000 4337
 5
57 5 11 10 24
26 6 43 58 37
 10
15 26 15 14 16 39 40 0 25 64
27 93 16 44 69 48 53 11 63 42
 3
5 1 2
4 2 8
 5
2 2 0 4 6
1 0 2 4 19
 4
2 0 0 3
4 6 2 4
 3
6 0 9
4 0 0
 2
6 9
5 13
 2
0 0
2 0
 5
32 4 6 33 12
39 20 24 155 77
 2
1010 1781
00000 4337
 5
57 5 11 10 24
26 6 43 58 31
 10
15 26 15 12 16 39 40 0 25 64
27 93 16 44 69 48 53 11 63 42
 3
5 1 2
4 1 12
 5
2 2 0 4 6
2 0 2 4 19
 4
2 0 0 4
4 6 2 4
 3
6 0 9
5 0 0
 2
9 9
5 13
 5
32 4 6 33 12
39 11 24 155 77
 2
0010 1781
00000 4337
 10
15 26 15 12 16 39 40 0 34 64
27 93 16 44 69 48 53 11 63 42
 3
5 1 2
5 1 12
 4
2 1 0 4
4 6 2 4
 2
9 9
5 17
 5
27 4 6 33 12
39 11 24 155 77
 2
0010 2375
00000 4337
 10
15 26 15 12 16 39 40 0 34 57
27 93 16 44 69 48 53 11 63 42
 3
5 1 2
1 1 12
 4
2 1 0 4
7 6 2 4

yes
 no
 yes
 yes
 yes
 yes
 yes
 yes
 yes
 yes
 yes
 no
 no
 no
 yes
 yes
 yes
 yes
 yes
 yes
 no
 YES
 NO
 YES
 YES
 YES
 NO
 NO
 YES
 YES
 YES
 YES
 NO
 YES
 NO
 YES
 YES
 YES
 YES
 YES
 NO
 NO
 YES
 YES
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 NO
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 NO
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 NO
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 NO
 NO
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 NO
 YES
 YES
 YES
 YES
 YES
 NO
 YES
 YES
