#include<iostream>
#include<algorithm>
#define REP(i,a,b) for(int i=a;i<b;i++)
using namespace std;
int m,n,c[50],w[50],u[50],l;
bool rec(int s,int t){
	if(w[s])REP(i,t,n){
		if(w[s]>=(l=c[t]-w[t])&&!u[t]){
			w[s]-=l,w[t]+=l,u[t]=1,m++;
			if(w[s]==0&&m==n)return 1;
			if(w[s]==0&&s+2<n)return rec(s+1,s+2);
			if(i+1<n)return rec(s,i+1);
			w[s]+=l,w[t]-=l,u[t]=0,m--;
		}
	}
	if(s+2<n)return rec(s+1,s+2);
	return 0;
}
int main(){
	while(cin>>n,n){
		REP(i,0,n)cin>>c[i],w[i]=u[i]=0;
		sort(c,c+n,greater<int>());
		m=u[0]=1,w[0]=c[0];
		cout<<(n==1||rec(0,1)?"YES":"NO")<<endl;
	}
	return 0;
}