#include<iostream>
#include<algorithm>
using namespace std;
int N;
int C[50];
bool g(const long,const long);
bool f(int res,int start,long now,long usd)
{
	if(res==0)
	{
		return g(now,usd);
	}
	int a=__builtin_ctzll(now);
	int b=__builtin_ctzll(~usd);
	if(a>b&&C[b]>res)return false;
	int pre=-1;
	for(int i=start;i<N;i++)
	{
		if(usd>>i&1||C[i]>res||pre==C[i])continue;
		if(f(res-C[i],i+1,now|1LL<<i,usd|1LL<<i))return true;
		pre=C[i];
	}
	return false;
}
bool g(long now,long usd)
{
	if(usd==((1LL<<N)-1))return true;
	for(int i=0;i<N;i++)
	{
		if(now>>i&1)
		{
			if(f(C[i],i+1,now&~(1LL<<i),usd))return true;
		}
	}
	return false;
}
main()
{
	while(cin>>N,N)
	{
		for(int i=0;i<N;i++)cin>>C[i];
		sort(C,C+N);
		reverse(C,C+N);
	    cout<<(g(1,1)?"YES":"NO")<<endl;
	}
}
