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

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

bool dfs(int p) {
  for (int i=0; i<p; i++) {
    if (b[i] < a[p]) {
      continue;
    }
    b[i] -= a[p];
    b[p] = a[p];
    if (b[i] && b[i] < a[n-1]) {
      b[i] += a[p];
      b[p] = 0;
      continue;
    }

    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 {
        b[i] += a[p];
        b[p] = 0;
      }
    } else {
      bool ret = dfs(p+1);
      if (ret) {
        return true;
      } else {
        b[i] += a[p];
        b[p] = 0;
      }
    }
  }
  return false;
}

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

  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;
}