#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <string>
#include <sstream>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

typedef long long ll;
typedef vector<int> vi;

#define REP(i,n,m) for(int i=n;i<m;i++)
#define rep(i,n) REP(i,0,n)

int n;
int t[52];
vi v;

bool solve(int);
bool solve2(int,int,int);

bool solve(int idx){
  if(idx == n) return true;
  if(v[idx] == 0) return false;

  int tmp = v[idx];
  v[idx] = 0;
  if(solve2(idx+1,idx+1,tmp)) return true;
  v[idx] = tmp;

  if(solve(idx+1)) return true;
  return false;
}

bool solve2(int from,int idx,int rem){
  if(rem == 0) return solve(from);
  if(idx >= n || rem < 0) return false;

  if(solve2(from,idx+1,rem)) return true;

  if(v[idx] == 0 && t[idx] <= rem){
    v[idx] = t[idx];
    if(solve2(from,idx+1,rem-t[idx])) return true;
    v[idx] = 0;
  }

  return false;
}

int main(){
  while(cin>>n,n){
    rep(i,n){
      cin>>t[i];
    }
    sort(t,t+n,greater<int>());

    v = vector<int>(n);
    v[0] = t[0];
    REP(i,1,n) v[i] = 0;

    cout<<(solve(0) ? "YES" : "NO")<<endl;
  }
}