#include <bits/stdc++.h>
using namespace std;

int n;
int cap[50];
bool used[50];
bool in[50];

bool solved()
{
	for (int i = 0; i < n; i++){
		if (!used[i]) return false;
	}
	return true;
}

bool dfs2(int cur, int s, vector<int> &res)
{
	if (s < 0) return false;
	if (s == 0) return true;
	if (cur == n) return false;
	
	if (in[cur] || used[cur]) return dfs2(cur + 1, s, res);
	if (dfs2(cur + 1, s - cap[cur], res)){
		res.push_back(cur);
		return true;
	}
	if (dfs2(cur + 1, s, res)){
		return true;
	}
	return false;
}

bool dfs(int cur)
{
	if (solved()) return true;
	if (cur == n) return false;
	
	vector<int> comb;
	if (in[cur] && dfs2(cur + 1, cap[cur], comb)){
		in[cur] = false;
		for (int i = 0; i < comb.size(); i++){
			in[comb[i]] = true;
			used[comb[i]] = true;
		}
		if (dfs(cur + 1)) return true;
		in[cur] = true;
		for (int i = 0; i < comb.size(); i++){
			in[comb[i]] = false;
			used[comb[i]] = false;
		}
	}
	return used[cur] && dfs(cur + 1);
}

bool solve()
{
	used[0] = in[0] = true;
	for (int i = 1; i < n; i++) used[i] = in[i] = false;
	return dfs(0);
}

int main()
{
	while (scanf("%d", &n), n){
		for (int i = 0; i < n; i++){
			scanf("%d", cap + i);
		}
		sort(cap, cap + n, greater<int>());
		
		puts(solve() ? "YES" : "NO");
	}
}