#include <bits/stdc++.h>
using namespace std;
char str[110];
int nums[110];
bool f[110];
int main() {
  int n;
  cin >> n;
  scanf("%s", str + 1);
  for (int i = 1; i <= n; i++) nums[i] = str[i] - '0' + nums[i - 1];
  if (!nums[n]) {
    cout << "YES" << endl;
    return 0;
  }
  for (int i = 1; i < nums[n]; i++) {
    memset(f, false, sizeof f);
    f[0] = 1;
    for (int j = 1; j <= n; j++) {
      for (int k = j; k > 0; k--) {
        if (f[k - 1] && nums[j] - nums[k - 1] == i) {
          f[j] = true;
        }
      }
    }
    if (f[n]) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
