#include <iostream>
#include <algorithm>
using namespace std;

int n;
int a[50];
int b[50];
int finished;

bool dfs(int p) {
  if (p - finished > n - p) {
    return false;
  }
  for (int i=0; i<p; i++) {
    if (b[i] < a[p]) {
      continue;
    }
    bool failed = false;

    if (b[i] == a[i]) {
      finished--;
    }
    b[i] -= a[p];
    b[p] = a[p];
    finished++;
    if (!b[i]) {
      finished++;
    }

    if (b[i] && b[i] < a[n-1]) {
      failed = true;
    }

    if (!failed) {
      if (p == n-1) {
        int j;
        for (j=0; j<n; j++) {
          if (b[j] && b[j]!=a[j]) {
            break;
          }
        }
        if (j == n) {
          return true;
        }
      } else {
        bool ret = dfs(p+1);
        if (ret) {
          return true;
        }
      }
    }

    finished--;
    if (!b[i]) {
      finished--;
    }
    b[i] += a[p];
    b[p] = 0;
    if (b[i] == a[i]) {
      finished++;
    }
  }
  return false;
}

bool solve() {
  sort(a, a+n, greater<int>());
  b[0] = a[0];
  for (int i=1; i<n; i++) {
    b[i] = 0;
  }
  finished = 1;

  bool ans;
  if (n > 1) {
    ans = dfs(1);
  } else {
    ans = true;
  }

  return ans;
}

int main() {
  bool ans;
  while (1) {
    cin >> n;
    if (!n) {
      break;
    }
    for (int i=0; i<n; i++) {
      cin >> a[i];
    }
    ans = solve();
    cout << (ans ? "YES" : "NO") << endl;
  }
  return 0;
}