//#pragma GCC optimize("Ofast") //#pragma GCC optimize "O3,omit-frame-pointer,inline" #include // cout, endl, cin #include // string, to_string, stoi #include // vector #include // min, max, swap, sort, reverse, lower_bound, upper_bound #include // pair, make_pair #include // tuple, make_tuple #include // int64_t, int*_t #include // printf #include // map #include // queue, priority_queue #include // set #include // stack #include // deque #include // unordered_map #include // unordered_set #include // bitset #include // isupper, islower, isdigit, toupper, tolower #include //fixed,setprecision #include //INT_MAX #include //M_PI #include #include // 正規表現 #include #include #include #include #include #include #include #include #include #include //複素数 //#include using namespace std; #include using namespace atcoder; //using mint = modint1000000007; //using mint = modint998244353; // using mint=modint; #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) //const int dx[8]={1,0,-1,0,1,1,-1,-1}; //const int dy[8]={0,1,0,-1,1,-1,1,-1}; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; bool canFormMax(const vector& arr, ll maxVal, vector& used, int startIndex, int currentSum) { if (currentSum == maxVal) return true; if (currentSum > maxVal || startIndex >= arr.size()) return false; for (int i = startIndex; i < arr.size(); ++i) { used.push_back(i); if (canFormMax(arr, maxVal, used, i + 1, currentSum + arr[i])) return true; used.pop_back(); } return false; } int main() { int n; cin>>n; vector a(n); setst; rep(i,n){ cin>>a[i]; st.insert(i); } sort(a.begin(),a.end()); ll maxVal = a[n-1]; st.erase(n-1); a.pop_back(); std::vector used; if (canFormMax(a, maxVal, used, 0, 0)) { for (int i : used) { st.erase(i); } if(st.empty())cout<<"No"<