/*
 * 0182.cc: Beaker
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 50;

/* typedef */

typedef long long ll;
typedef vector<ll> vl;

/* global variables */

int n, as[MAX_N];
ll gbits, gmask;
vl bs[MAX_N];

/* subroutines */

void make_bits(int k, int i, int m, ll bits) {
  if (m == 0) {
    bs[k].push_back(bits);
    return;
  }
  if (i < 0) return;

  for (int j = i; j >= 0; j--)
    if (m >= as[j])
      make_bits(k, j - 1, m - as[j], bits | (1LL << j));
}

void print_bits(ll x) {
  for (int i = n - 1; i >= 0; i--)
    putchar((x & (1LL << i)) != 0 ? '1' : '0');
}

bool rec(ll mask, ll bits, int k) {
  if (mask == gmask) return true;

  ll vb = (1LL << k);
  while (k < n && (mask & vb) != 0) k++, vb <<= 1;
  if (k >= n) return false;
  
  vl &bi = bs[k];
  for (vl::iterator vit = bi.begin(); vit != bi.end(); vit++)
    if ((bits & *vit) == *vit) {
      ll mask0 = mask | vb;
      ll bits0 = (bits ^ *vit) | vb;
      if (rec(mask0, bits0, k + 1)) return true;
    }
  return false;
}

/* main */

int main() {
  for (;;) {
    cin >> n;
    if (n == 0) break;

    for (int i = 0; i < n; i++) cin >> as[i];
    sort(as, as + n);
    if (n == 1) {
      puts("YES");
      continue;
    }
    
    for (int i = 0; i < n; i++) {
      bs[i].clear();
      make_bits(i, i - 1, as[i], 0);
      continue;
      printf("as[%d]=%d, %lu: ", i, as[i], bs[i].size());
      for (int j = 0; j < bs[i].size(); j++)
	print_bits(bs[i][j]), putchar(' ');
      putchar('\n');
    }

    gbits = (1LL << (n - 1));
    gmask = (1LL << n) - 1;
    
    ll bits = 0;
    for (int i = 0; i < n; i++)
      if (bs[i].size() == 0) bits |= (1LL << i);

    bool ok = false;
    for (int i = bs[n - 1].size() - 1; i >= 0; i--)
      if ((bits & bs[n - 1][i]) == bits &&
	  rec(bs[n - 1][i], bs[n - 1][i], 0)) {
	ok = true;
	break;
      }

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

  return 0;
}