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

const int N = 50;

int n;
vector<int> beaker;
bitset<N> full;
bitset<N> used;

bool pour(int water, int start);
bool check();

bool pour(int water, int start) {
    for(int i = start; i < n; ++i) {
        if(used[i]) continue;

        if(water < beaker[i]) continue;
        else if(water == beaker[i]) {
            full.set(i);
            used.set(i);
            if(check()) return true;
            full.reset(i);
            used.reset(i);
        } else {
            full.set(i);
            used.set(i);
            if(pour(water - beaker[i], i + 1)) return true;
            full.reset(i);
            used.reset(i);
        }
    }
    return false;
}

bool check() {
    if(used.count() == n) return true;
    for(int i = 0; i < n; ++i) {
        if(!used[i] && !used[i]) return false;
        if(!full[i]) continue;
        full.reset(i);
        if(pour(beaker[i], i + 1)) return true;
        full.set(i);
    }
    return false;
}

int main() {
    while(cin >> n, n) {
        beaker.resize(n);
        for(auto& b: beaker) cin >> b;
        sort(beaker.begin(), beaker.end(), greater<int>());
        full = bitset<N>(1);
        used = bitset<N>(1);
        cout << (check() ? "YES" : "NO") << endl;
    }
}