func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   int a[26];   int b[26];   bool ok;   inline void go(int v, int rem, int cur, int last) {     if (v == n) {       ok = 1;       for (int i = 1; i <= n && ok; ++i)         if (b[i]) ok = 0;       if (ok) {         puts( YES );         exit(0);       }     }     if (rem == 1) {       if (cur == 1) return;       if (v + 1 != n) ++b[a[v]];       go(v + 1, a[v + 1], 0, n);       if (v + 1 != n) --b[a[v]];       return;     }     if (!cur) {       for (int i = rem - 2; i >= 1; --i) {         if (!b[i]) continue;         --b[i];         go(v, rem - i, cur + 1, i);         ++b[i];       }     } else {       for (int i = min(rem - 1, last); i >= 1; --i) {         if (!b[i]) continue;         --b[i];         go(v, rem - i, cur + 1, i);         ++b[i];       }     }   }   int main() {     scanf( %d , &n);     for (int i = 0; i < n; ++i) scanf( %d , &a[i]);     sort(a, a + n);     ok = 1;     for (int i = 0; i < n; ++i)       if (a[i] == 2) ok = 0;     if (a[n - 1] != n || !ok) {       puts( NO );       return 0;     }     go(0, a[0], 0, n);     puts( NO );     return 0;   }   