#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 now, int n, int beaker[], bool vis[], bool w[], int wnum, int water[])
{
  bool ng = false;
  for(int i = 0; i < n; ++i){
    if( !vis[i] ) ng=true;
  }
  if( !ng && wnum == 0 ) return true;

  /* 
  for(int i = 0; i < depth; ++i){
    cout << ' ';
  }
  cout << " WATER : ";
  for(int i = 0; i < n; ++i){
    cout << w[i] << "(" << beaker[i] << ")" << ' ';
  }
  cout << " REMANING : ";
  for(int i = 0; i < wnum; ++i){
  cout << water[i] << ' ';
  }
  cout << endl;
  */

  if( wnum > 0 ){
    for(int i = 0; i < n; ++i){
      if( !vis[i] && !w[i] && water[ wnum - 1 ] >= beaker[i] ){
	int diff = water[ wnum - 1 ] - beaker[i];

	if( diff == 0 ){
	  water[ wnum - 1 ] = 0;
	  --wnum;
	}else{
	  water[ wnum - 1 ] -= beaker[i];
	}

	vis[i] = true;
	w[i] = true;
	++depth;
	if( dfs( now, n, beaker, vis, w, wnum, water ) ) return true;
	--depth;
	vis[i] = false;
	w[i] = false;
	
	if( diff == 0 ){
	  ++wnum;
	  water[ wnum-1 ] += beaker[i];
	}else{
	  water[ wnum-1 ] += beaker[i];
	}
      }
    }
    //return false;
  }

  bool skip = false;
  bool first = true;
  for(int i = 0; i < n; ++i){
    if( vis[i] && w[i] ){
      for(int j = i+1; j < n; ++j){
	if( !vis[j] && !w[j] ){
	  int diff = beaker[i] - beaker[j];
	  if( diff != 0 ){
	    water[wnum] = diff;
	    ++wnum;
	  }

	  vis[j]=true;
	  w[i]=false;
	  w[j]=true;
	  ++depth;
	  if( dfs(i,n,beaker,vis,w,wnum,water) ){
	    return true;
	  }
	  --depth;
	  vis[j]=false;
	  w[i]=true;
	  w[j]=false;

	  if( diff != 0 ){
	    --wnum;
	    water[wnum] = 0;
	  }
	  break;
	}
      }
      if( !skip ){
	skip = true;
	continue;
      }else return false;
      first = false;
    }else{
      if( !first ) return false;
    }
  }

  return false;
}

int main()
{
  while(true){
    int n;
    bool vis[MAX] = { false, };
    bool water[MAX] = {false,};
    int waters[WMAX];
    int wnum=0;
    int beaker[MAX];
    cin >> n;
    if( n == 0 ) break;
    for(int i = 0; i < n; ++i){
      cin >> beaker[i];
    }
    sort(beaker,beaker+n,greater<int>());
    vis[0]=water[0]=true;
    depth = 0;
    if( dfs( 0,n,beaker,vis,water,wnum,waters ) ){
      puts("YES");
    }else{
      puts("NO");
    }
  }
  return 0;
}