#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>

#define MAX 64
#define WMAX 1024
#define CAP_MAX 128

using namespace std;

int depth;
bool dfs(int num, int n, int beaker[], bool vis[], int rem[])
{
  if( num == n ){
    for(int i = 0; i < n; ++i)
      if( 0 < rem[i] && rem[i] < beaker[i] )
	return false;
    return true;
  }

  /*
  for(int i = 0; i < depth; ++i){
    putchar(' ');
  }
  for(int i = 0; i < n; ++i){
    cout << beaker[i] << "(" << rem[i] << ")" << ' ';
  }
  cout << endl;
  */

  bool first = true;
  for(int i = 0; i < n; ++i){
    if( vis[i] && rem[i] > 0 ){
      for(int j = i+1; j < n; ++j){
	if( !vis[j] && rem[j] == 0 && beaker[j] <= rem[i] ){

	  rem[i] -= beaker[j];
	  int t = rem[j];
	  rem[j] = beaker[j];

	  vis[j]=true;
	  ++depth;
	  if( dfs(num+1,n,beaker,vis,rem) ) return true;
	  --depth;
	  vis[j]=false;

	  rem[i] += beaker[j];
	  rem[j] = t;

	  if( i == 0 ) return false;
	  break;
	}
      }
      return false;
      first = false;
    }else{
      return false;
      if( !first ) return false;
    }
  }

  return false;
}

int main()
{
  while(true){
    int n;
    bool vis[MAX] = { false, };
    int rem[MAX];
    int beaker[MAX];
    cin >> n;
    if( n == 0 ) break;
    for(int i = 0; i < n; ++i){
      cin >> beaker[i];      
      rem[i] = 0;
    }
    sort(beaker,beaker+n,greater<int>());
    vis[0]=true;
    rem[0]=beaker[0];
    depth = 0;
    string res = "NO";
    if( dfs( 1,n,beaker,vis,rem ) ){
      res = "YES";
    }
    puts(res.c_str());
  }
  return 0;
}