#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

typedef vector <int> VI;
typedef vector <bool> VB;
typedef long long LL;
typedef set <LL> SET;
typedef vector <SET> VSET;

const int size = 51;

VI B;
VB U, F;
int C;
int n;
VSET V;

bool dist( int a, int v, int s );
bool solve();

bool dist( int a, int v, int s ) {
    LL S = 0, T = 1;
    for ( int i = 0; i < s; ++ i ) {
        if ( F[i] ) S += T;
        T <<= 1;
    }
    if ( V[s].count( S ) ) return false;
    V[s].insert( S );
    for ( int i = a-1; i >= 0; -- i ) {
        if ( U[i] ) continue;
        if ( B[i] == v ) {
            F[i] = true;
            U[i] = true;
            C ++;
            if ( C == n ) return true;
            if ( solve() ) return true;
            C --;
            F[i] = false;
            U[i] = false;
        } else if ( B[i] < v ) {
            F[i] = true;
            U[i] = true;
            C ++;
            if ( dist( i, v - B[i], s ) ) return true;
            C --;
            F[i] = false;
            U[i] = false;
        }
    }
    return false;
}

bool solve() {
    for ( int i = n - 1; i >= 0; -- i ) {
        if ( ! F[i] ) continue;
        F[i] = false;
        LL S = 0, T = 1;
        for ( int j = 0; j < i; ++ j ) {
            if ( F[j] ) S += T;
            T <<= 1;
        }
        if ( ! V[i].count( S ) && dist( i, B[i], i ) ) return true;
        F[i] = true;
    }
    return false;
}

int main() {
    while ( cin >> n && n ) {
        C = 0;
        B = VI( n );
        U = VB( n, false );
        F = VB( n, false );
        V = VSET( n );
        
        for ( int i = 0; i < n; ++ i ) cin >> B[i];
        sort( B.begin(), B.end() );
        C ++;
        U[n-1] = F[n-1] = true;
        if ( n == 1 ) {
            cout << "YES" << endl;
        } else {
            cout << ( solve() ? "YES" : "NO" ) << endl;
        }
    }
    return 0;
}