#include <bits/stdc++.h>
using namespace std;
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcount(s);
}
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
const int MAXN = 5e5 + 100;
const int MOD = 1e9 + 7;
const double eps = 1e-12;
const long long INF = 1e16;
inline string toStr(long long x) {
  string tmp = "";
  do tmp = char(x % 10 + '0') + tmp;
  while (x /= 10);
  return tmp;
}
inline long long toInt(string s) {
  long long res = 0;
  for (auto x : s) res = res * 10 + x - '0';
  return res;
}
inline string toBinStr(long long x) {
  string res = "";
  do res = (x % 2 ? "1" : "0") + res;
  while (x >>= 1LL);
  return res;
}
bool cmp(pair<long long, long long> x, pair<long long, long long> y) {
  return x.second > y.second || (x.second == y.second && x.first > y.first);
}
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<long long, long long>> a(n);
  long long sum = 0;
  for (int i = 0, _a = (n); i < _a; ++i)
    scanf("%lld", &a[i].first), sum += a[i].first;
  for (int i = 0, _a = (n); i < _a; ++i) scanf("%lld", &a[i].second);
  sort(begin(a), end(a), cmp);
  int mmax = a[0].second + a[1].second;
  if (sum > mmax)
    puts("NO");
  else {
    puts("YES");
  }
}

### Prompt

In cpp, your task is to solve the following problem:

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".

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcount(s);
}
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
const int MAXN = 5e5 + 100;
const int MOD = 1e9 + 7;
const double eps = 1e-12;
const long long INF = 1e16;
inline string toStr(long long x) {
  string tmp = "";
  do tmp = char(x % 10 + '0') + tmp;
  while (x /= 10);
  return tmp;
}
inline long long toInt(string s) {
  long long res = 0;
  for (auto x : s) res = res * 10 + x - '0';
  return res;
}
inline string toBinStr(long long x) {
  string res = "";
  do res = (x % 2 ? "1" : "0") + res;
  while (x >>= 1LL);
  return res;
}
bool cmp(pair<long long, long long> x, pair<long long, long long> y) {
  return x.second > y.second || (x.second == y.second && x.first > y.first);
}
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<long long, long long>> a(n);
  long long sum = 0;
  for (int i = 0, _a = (n); i < _a; ++i)
    scanf("%lld", &a[i].first), sum += a[i].first;
  for (int i = 0, _a = (n); i < _a; ++i) scanf("%lld", &a[i].second);
  sort(begin(a), end(a), cmp);
  int mmax = a[0].second + a[1].second;
  if (sum > mmax)
    puts("NO");
  else {
    puts("YES");
  }
}

```