#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<sstream>
#include<cassert>
#include<queue>
#include<stack>

#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
#define ALL(C)     (C).begin(),(C).end()
#define pb         push_back
#define mp         make_pair
#define vint       vector<int>
#define FOR(it,o)  for(__typeof((o).begin()) it=(o).begin(); it!=(o).end(); ++it)
#define lli	    long long int
#define ld	    long double

#define N 50

using namespace std;

int C[N], n;
bool used[N], full[N];

bool selectFrom();

set<lli> visited[50];

bool selectTo(int now, int volume, int source){

  lli bit = 0, tmp = 1;
  for(int i=0; i<source; i++){
    if(full[i]){
      bit += tmp;
    }
    tmp = (tmp << 1);
  }
  if(visited[source].find(bit) != visited[source].end())return false;
  visited[source].insert(bit); 
  for(int to = now-1; to >= 0; to--){
    if(used[to])continue;
    if(C[to] == volume){
      full[to] = true;
      used[to] = true;
      bool end = true;
      rep(i, n){
	if(!used[i])end = false;
      }
      if(end)return true;
      else {
	if(selectFrom()){
	  return true;
	}
	else {
	  full[to] = false;
	  used[to] = false;
	}
      }
    }
    if(C[to] < volume){
      full[to] = true;
      used[to] = true;
      
      if(selectTo(to, volume - C[to], source)){
	return true;
      }
      else { 
	full[to] = false;
	used[to] = false;
      }
    }
  }   
  return false;
}

bool selectFrom(){
  for(int from = n-1; from >= 0; from--){
    if(!full[from])continue;
    full[from] = false;  
    lli bit = 0, tmp = 1;
    for(int i=0; i<from; i++){
      if(full[i]){
	bit += tmp;
      }
      tmp = (tmp << 1);
    }
    if(visited[from].find(bit) != visited[from].end()){
      full[from] = true;
      continue;
    }
    if(selectTo(from, C[from], from)){
      return true;
    }
    else { 
      full[from] = true;
    }
  }  
  return false;
}

main(){
  while(cin >> n){
    if( n == 0)break;
  
    if(n == 1){
      cin >> C[0];
      cout << "YES" << endl;
      continue;
    }
    
    rep(i, n){
      cin >> C[i];
    }
    sort(C, C + n);
    rep(i, n){
      used[i] = full[i] = false;
      visited[i].clear();
    }
    used[n-1] = full[n-1] = true;
    if(selectFrom()){
      cout << "YES" << endl;
    }
    else cout << "NO" << endl;

  }
}