
import std.stdio, std.algorithm, std.typecons;

enum Type {Empty = 0, Fill, Used}

alias Tuple!(int, "cap", Type, "type") Cup;

void show_state(Cup[] state) {
  foreach(i, s; state) {
    writefln("[%d] cap: %d, type: %s", i, s.cap, s.type);
  }
  writeln;
}

// index 番目以降のコップに cap だけ注ぐ
bool pour(ref Cup[] state, int cap, int index) {
  if (cap == 0) return true;
  if (cap < 0) return false;
  bool ans = true;
  for(int i = index; i < state.length; i++) {
    if (state[i].type == Type.Empty) {
      state[i].type = Type.Fill;
      if (pour(state, cap - state[i].cap, i + 1)) return true;
      state[i].type = Type.Empty;
      ans = false;
    }
  }
  return ans;
}

bool exists_empty(Cup[] state) {
  bool res = false;
  foreach(s; state) res |= (s.type == Type.Empty);
  return res;
}

bool solve(int[] arr) {
  Cup[] state;
  foreach(i; arr) state ~= Cup(i, Type.Empty);
  state[0].type = Type.Fill;
  // writeln(arr);
  foreach(int i, ref Cup c; state) {
    if (c.type == Type.Fill) {
      c.type = Type.Used;
      if (pour(state, c.cap, i) == false) return false;
      // show_state(state);
      if (!exists_empty(state)) return true;
    }
    if (c.type == Type.Empty) return false;
  }
  return false;
}

void main() {
  for(int times; readf("%d\n", &times), times != 0;) {
    int[] arr = new int[](times);
    foreach(i; 0..times)
      scanf((i == times - 1) ? "%d\n" : "%d", &arr[i]);
    sort!q{a > b}(arr);
    writeln(solve(arr) ? "YES" : "NO");
  }
}