#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 long long int LL;
typedef set <LL> SET;

const int size = 51;

int B[size];
bool U[size];
bool F[size];
int C;
int n;
SET V[size];

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

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

bool solve() {
    if ( C == n ) return true;
    for ( int i = n - 1; i >= 0; -- i ) {
        if ( ! F[i] ) continue;
        F[i] = false;
        if ( dist( i, B[i], i ) ) {
            return true;
        } else {
            F[i] = true;
        }
    }
    return false;
}

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