Jafar has *n* cans of cola. Each can is described by two integers: remaining volume of cola *a*<sub class="lower-index">*i*</sub> and can's capacity *b*<sub class="lower-index">*i*</sub> (*a*<sub class="lower-index">*i*</sub>  ≤  *b*<sub class="lower-index">*i*</sub>).

Jafar has decided to pour all remaining cola into just 2 cans, determine if he can do this or not!
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 *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (0 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — volume of remaining cola in cans.

The third line contains *n* space-separated integers that *b*<sub class="lower-index">1</sub>, *b*<sub class="lower-index">2</sub>, ..., *b*<sub class="lower-index">*n*</sub> (*a*<sub class="lower-index">*i*</sub> ≤ *b*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — capacities of the cans.
In the first sample, there are already 2 cans, so the answer is "YES".
2
3 5
3 6
YES
3
6 8 9
6 10 12
NO
5
0 0 5 0 0
1 1 8 10 5
YES
4
4 1 0 3
5 2 2 3
YES
10
9 10 24 11 1 7 8 3 28 14
86 20 34 11 22 94 8 16 73 85
YES
4
25 35 7 31
70 37 43 35
YES
10
15 26 15 14 14 39 40 4 25 39
27 72 16 44 69 48 53 17 63 42
NO
5
22 5 19 16 32
26 10 43 38 37
NO
5
32 4 22 40 26
39 20 36 98 44
YES
6
18 25 3 10 13 37
38 73 19 35 24 37
YES
2
2 2
2 2
YES
2
2 5
2 5
YES
2
1000 1008
10000 2352
YES
5
1 2 3 4 5
1 2 3 4 11
YES
4
1 0 0 0
2 0 0 0
YES
2
0 0
1 2
YES
3
9 13 4
10 14 5
NO
2
0 0
1 1
YES
5
1 1 2 3 1
1 1 2 3 4
NO
2
0 0
0 0
YES
3
5 1 1
5 5 5
YES
import sys

line = [int(x) for x in sys.stdin.read().strip().split()]

canNum = int(line[0])

if canNum == 2:

    print("YES")

elif  canNum < 2 or canNum > 100000:

    print("NO")

else:
    
    remain = []
   # cap = []
    

    for i in range (1, canNum + 1):

        remain.append(int(line[i]))
    
    max1 = -1
    max2 = -1
    ind1 = -1
    ind2 = -1
    k = 0
    for j in range (canNum + 1, (canNum * 2) + 1):

       # cap.append(int(line[j]))
        
        if int(line[j]) >= max1:

            max2 = max1
            max1 = int(line[j])
            
            ind2 = ind1
            ind1 = k

            k += 1

            continue
        
        if int(line[j]) > max2:

            max2 = int(line[j])
            ind2 = k
        
        k += 1
    
    possible = True

    for i in range(0, len(remain)):
        
        if i == ind1 or i == ind2:

            continue

        if (remain[ind1] + remain[i]) <= max1:
        
            remain[ind1] += remain[i]
    

        elif (remain[ind1] + remain[i]) > max1:

            fin = ((remain[ind1] + remain[i]) % max1)

            if fin != 0:
            
                if (fin + remain[ind2]) <= max2:

                    remain[ind2] += fin 
                    
                    remain[ind1] = max1

                else:

                    possible = False
            
            else:

                possible = False
   
    if possible:

        print("YES")

    else:

        print("NO")

sys.exit(0)
