#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
const unsigned int M = 1000000007;
priority_queue<int, vector<int>, greater<int> > q;
vector<int> seq;
vector<int> graph[100005];
bool visit[100005];
bool achie[201];
int a[110];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  vector<int> v1;
  string s;
  int n, k = 0, sum = 0;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    a[i] = s[i] - 48;
    sum += a[i];
  }
  int ans, flag;
  for (int i = 0; i <= sum / 2; i++) {
    ans = 0;
    for (int j = 0; j < n; j++) {
      ans += a[j];
      if (ans == i) {
        ans = 0;
      }
    }
    if (ans == 0) {
      cout << "YES"
           << "\n";
      return 0;
    }
  }
  cout << "NO"
       << "\n";
}
