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

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

using namespace std;

int water[MAX];
int beaker[MAX];
bool vis[MAX];

bool dfs( int n, int num );
bool pour( int n, int w, int from, int now, int num );

bool pour( int n, int w, int from, int now, int num )
{
  if( w == 0 ){
    if( dfs( n, num ) ) return true;
    return false;
  }
  if( w < 0 || from >= n || now >= n ) return false;

  for(int i = from+1; i < n; ++i){
    if( beaker[i] == water[i] ) break;
    if( !vis[i] && beaker[i] > w ) return false;
  }
  
  int pre = -1;
  for(int i = now; i < n; ++i){
    if( !vis[i] && beaker[i] <= w ){
      if( pre == beaker[i] ) continue;

      water[i] += beaker[i];
      vis[i] = true;
      if( pour( n, w-beaker[i], from, i+1, num+1 ) ) return true;
      vis[i] = false;
      water[i] -= beaker[i];

      pre = beaker[i];
    }
  }
  return false;
}

bool dfs( int n, int num )
{
  if( num == n ){
    return true;
  }

  for(int i = 0; i < n; ++i){
    if( vis[i] && beaker[i] == water[i] ){
      water[i]=0;
      if( pour( n, beaker[i], i, i+1, num ) ) return true;
      water[i]=beaker[i];
    }
  }
  return false;
}

int main()
{
  while(true){
    int n;
    string res = "NO";

    cin >> n;
    if( n == 0 ) break;

    for(int i = 0; i < MAX; ++i){
      beaker[i] = 0;
      vis[i] = false;
      water[i] = 0;
    }

    for(int i = 0; i < n; ++i){
      cin >> beaker[i];
    }
    
    sort(beaker,beaker+n,greater<int>());
    water[0]=beaker[0];
    vis[0]=true;

    if( dfs( n, 1 ) ){
      res = "YES";
    }

    puts(res.c_str());
  }
  return 0;
}