#include <bits/stdc++.h>
using namespace std;
int dp[110][1100], a[110], pref[110], n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    char c;
    cin >> c;
    a[i] = c - '0';
    pref[i] = pref[i - 1] + a[i];
  }
  for (int i = 1; i < n; i++) {
    dp[i][pref[i]] = 1;
  }
  for (int i = 2; i <= n; i++) {
    for (int j = 2; j <= i; j++) {
      dp[i][pref[i] - pref[j - 1]] |= dp[j - 1][pref[i] - pref[j - 1]];
    }
  }
  bool can = 0;
  for (int sum = 0; sum <= 1000; sum++)
    if (dp[n][sum]) return cout << "YES", 0;
  cout << "NO";
}
