Problem:
Score : 200 points

Problem Statement

Determine if an N-sided polygon (not necessarily convex) with sides of length L_1, L_2, ..., L_N can be drawn in a two-dimensional plane.

You can use the following theorem:

Theorem: an N-sided polygon satisfying the condition can be drawn if and only if the longest side is strictly shorter than the sum of the lengths of the other N-1 sides.

Constraints

All values in input are integers.

3 \leq N \leq 10

1 \leq L_i \leq 100

Input

Input is given from Standard Input in the following format:

N
L_1 L_2 ... L_N

Output

If an N-sided polygon satisfying the condition can be drawn, print Yes; otherwise, print No.

Sample Input 1

4
3 8 5 1

Sample Output 1

Yes

Since 8 < 9 = 3 + 5 + 1, it follows from the theorem that such a polygon can be drawn on a plane.

Sample Input 2

4
3 8 4 1

Sample Output 2

No

Since 8 \geq 8 = 3 + 4 + 1, it follows from the theorem that such a polygon cannot be drawn on a plane.

Sample Input 3

10
1 8 10 5 8 12 34 100 11 3

Sample Output 3

No

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <stdio.h>
#include <stdlib.h>

#include <iostream>
#include <iomanip>
#include <sstream>
#include <stdint.h>
#include <string.h>

#include <unordered_set>

//#define _USE_MATH_DEFINES
//#include <math.h>


#include <vector>
#include <list>

#include <set>
#include <map>

#include <unordered_map>

#include <queue>

#include <string>

#include <vector>

#define sqr(x) (x) * (x)

#include <algorithm>
#include <functional>

#include <bitset>

#include <functional>

#include <chrono>

typedef unsigned int u32;
typedef int i32;

typedef unsigned long long int u64;
typedef long long int i64;

typedef uint16_t u16;
typedef int16_t i16;

typedef uint8_t u8;
typedef int8_t i8;


using namespace std;
using namespace std::chrono;

//struct less_key
//{
//    bool operator() (i64 p1, i64 p2)
//    {
//        return (p1.first < p2.first) || ((p1.first == p2.first) && (p1.second < p2.second));
//    }
//};
//
//struct pair_hash
//{
//    std::size_t operator()(const i64& k) const
//    {
//        return static_cast<size_t>(k.first ^ k.second);
//    }
//};

#include <random>

const i64 mod1 = 1000000007ll;
const i64 mod2 = 998244353ll;
const i64 inf = 10000000000000007ll;

const double eps = 1e-10;

template <typename T = i64, T D = 0>
class MaxOp {
public:
    static T op(const T& a, const T&b) {
        return max(a, b);
    }

    static T def() {
        return (T)D;
    }
};

template <typename T = i64, T D = inf>
class MinOp {
public:
    static T op(const T& a, const T&b) {
        return min(a, b);
    }

    static T def() {
        return (T)D;
    }
};

template <typename T = i64, T D = 0>
class SumOp {
public:
    static T op(const T& a, const T&b) {
        return a + b;
    }

    static T def() {
        return (T)D;
    }
};

template <typename D, typename T = i64>
class SegTree {
public:
    i64 n;
    vector<T> t;

private:
    void build (const i64* a, int v, int tl, int tr) {
        if (tl == tr)
            t[v] = a[tl];
        else {
            int tm = (tl + tr) / 2;
            build (a, v*2, tl, tm);
            build (a, v*2+1, tm+1, tr);
            t[v] = lca(t[v*2], t[v*2+1]);
        }
    }

    i64 get (int v, int tl, int tr, int l, int r) {
        if (l > r)
            return D().def();
        if (l == tl && r == tr)
            return t[v];
        int tm = (tl + tr) / 2;
        return D().op(get (v*2, tl, tm, l, min(r,tm)),
                      get (v*2+1, tm+1, tr, max(l,tm+1), r));
    }

public:
    void build(const vector<i64 >& a) {
        n = a.size();
        t.resize(n * 4);
        build(a.data(), 1, 0, n - 1);
    }

    void build(i64* a, i64 n) {
        this->n = n;
        t.resize(n * 4);
        build(a, 1, 0, n - 1);
    }


    i64 get(i64 l, i64 r) {
        return get(1, 0, n - 1, l, r);
    }
};


// delimeter


i64 n;


int main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout.precision(15); cout.setf(ios::fixed);

    int N;
    cin >> N;
    int L;
    int max = 0;
    int sum = 0;
    for (int i = 0; i < N; ++i) {
        cin >> L;
        sum += L;
        if (L > max) {
            max = L;
        }
    }

    cout << (2*max < sum ? "Yes" : "No");
    return 0;
}