#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

struct Solution {
    vector<int> used, used2, v;
    int N;
    bool rec(int cur, int rest){
        if(!rest) return true;
        if(cur < 0) return false;
        if(used2[cur] && v[cur] <= rest){
            used2[cur] = 0;
            if(rec(cur-1, rest-v[cur])) return true;
            used2[cur] = 1;
        }
        return rec(cur-1, rest);
    }

    int ok(int cur, int rest){
        if(!rest){
            used2 = used;
            for (int i = 1; i < N; ++i) {
                if(used2[i]) continue;
                if(!rec(i-1, v[i])) return 0;
                used2[i] = 1;
            }
            return true;
        }else if(rest < v[cur]) return 0;
        used[cur] = 1;
        if(ok(cur+1, rest-v[cur])) return 1;
        used[cur] = 0;
        return ok(cur+1, rest);
    }

    void solve(int n){
        if(n == 1){
            cin >> n;
            puts("YES");
            return;
        }
        N = n;
        used.resize(n, 0);
        fill(used.begin(),used.end(),0);
        v.resize(n);
        for (auto &&i : v) scanf("%d", &i);
        sort(v.begin(),v.end());
        used[0] = 1;
        puts(ok(1, v.back()-v.front()) ? "YES" : "NO");
    }
};

int main() {
    int n;
    Solution s;
    while(cin >> n, n) s.solve(n);
    return 0;
}
