#include <iostream>
#include <queue>
#include <algorithm>
#include <set>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int v[50];
int n;
long long done;
set<long long> memo;
bool dfs(int pos,long long bit){
	done |= (1ll<<pos);
	if(done == (1<<n)-1) return true;
	if(memo.find(bit) != memo.end())return false;
	
	if(pos == n-1) return false;
	
	queue< pair<int,long long> > Q;
	for(int i=pos+1;i<n;i++)
		if( !(bit & (1ll<<i)) ) Q.push(make_pair(v[i],(1ll<<i)));
	
	while(Q.size()){
		pair<int,long long> q = Q.front(); Q.pop();
		if(q.first == v[pos]){
			rep(i,n) if((1ll<<i) & q.second) if(dfs(i,bit|q.second)) return true;
		}
		for(int i=pos+1;i<n;i++){
			if( ((1ll<<i)|bit) & q.second) continue;
			if(q.first+v[i] <= v[pos]) Q.push(make_pair(q.first+v[i],q.second|(1ll<<i)));
		}
	}
	return false;
}
int main(){
	while(cin >> n , n){
	rep(i,n) cin >> v[i];
		sort(v,v+n,greater<int>());
		done = 0;
		dfs(0,0);
		cout << (dfs(0,0)?"YES":"NO") << endl;
	}
}