#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e9 + 5;
const long long int MOD = 998244353;
using namespace std;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  int sum1 = 0;
  for (int i = 0; i < n - 1; ++i) {
    sum1 += s[i] - '0';
    bool ok = true;
    int pos = i + 1;
    int sum2 = 0;
    while (pos < n) {
      sum2 = s[pos++] - '0';
      while (pos < n && sum2 + s[pos] - '0' <= sum1) {
        sum2 += s[pos] - '0';
        ++pos;
      }
      if (sum2 != sum1) ok = false;
    }
    if (sum1 != sum2) {
      ok = false;
    }
    if (ok) {
      cout << "Yes" << endl;
      return;
    }
  }
  cout << "No" << endl;
}
int main() {
  solve();
  return 0;
}
