#include<iostream>
#include<vector>
#include<set>
#include<algorithm>
#include<functional>
using namespace std;

vector<int> select(const vector<int>& beaker, const vector<int>& full, int water, int n) {
    vector<int> result;
    for(int i = n; i >= 0; --i) {
        if(!full[i]) continue;
        if(water < beaker[i]) continue;
        if(water == beaker[i]) return {i};
        vector<int> add = select(beaker, full, water - beaker[i], i - 1);
        if(add.empty()) continue;
        result = {i};
        result.insert(result.begin(), add.begin(), add.end());
        return result;
    }
    return result;
}

bool check(const vector<int>& beaker) {
    int water = beaker.back();
    vector<int> full(beaker.size(), 0);
    for(int i = 0; i < beaker.size(); ++i) {
        water -= beaker[i];
        if(water < 0) {
            for(int j: select(beaker, full, -water, i - 1)) {
                water += beaker[j];
                full[j] = 0;
            }
        }
        full[i] = 1;
        if(water < 0) return false;
    }
    return true;
}

int main() {
    int n;
    while(cin >> n, n) {
        vector<int> beaker(n);
        for(auto& e: beaker) cin >> e;
        sort(beaker.begin(), beaker.end());
        cout << (check(beaker) ? "YES" : "NO") << endl;
    }
}