#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > vec[33];
vector<int> v;
int main() {
  int n;
  cin >> n;
  vec[1].push_back(vector<int>());
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j < i - 1; j++) {
      int k = i - 1 - j;
      for (auto v : vec[j]) {
        vector<int> z;
        v.push_back(j);
        if (k <= j) {
          for (auto w : vec[k]) {
            w.push_back(k);
            z.resize(v.size() + w.size());
            merge(v.begin(), v.end(), w.begin(), w.end(), z.begin());
            vec[i].push_back(z);
          }
        }
        for (auto w : vec[k + 1]) {
          if (w.back() > j) break;
          z.resize(v.size() + w.size());
          merge(v.begin(), v.end(), w.begin(), w.end(), z.begin());
          vec[i].push_back(z);
        }
      }
    }
  }
  v.resize(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  sort(v.begin(), v.end());
  if (v.back() != n) return puts("NO"), 0;
  v.pop_back();
  for (auto w : vec[n])
    if (v == w) return puts("YES"), 0;
  puts("NO");
  return 0;
}
