#include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>

using namespace std;

int n;
int cap[50], v[50];

bool dfs(int k) {
    if (n <= k) {
        for (int i=0; i<n; ++i) {
            if (0 < v[i] && v[i] != cap[i]) {
                return false;
            }
        }
        return true;
    }
    for (int i=0; i<k; ++i) {
        if (cap[k] <= v[i]) {
            v[i] -= cap[k];
            v[k] = cap[k];
            if (dfs(k+1)) {
                return true;
            }
            v[i] += cap[k];
            v[k] = 0;
        }
    }
    return false;
}

int main() {
    while (cin >> n, n) {
        for (int i=0; i<n; ++i) {
            cin >> cap[i];
        }
        sort(cap, cap+n, greater<int>());
        v[0] = cap[0];

        cout << ((n == 1 || dfs(1)) ? "YES" : "NO") << endl;
    }
    return 0;
}