#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, pos = 0;
  string a;
  cin >> n >> a;
  int sum = 0, sum1 = 0;
  bool ok = false;
  while (ok != true) {
    sum1 += a[pos] - '0';
    for (int i = (pos + 1); i < n; i++) {
      sum += a[i] - '0';
      if (sum == sum1 && a[i + 1] != '\0' && a[i + 1] != '0') {
        sum = 0;
      }
    }
    if (sum == sum1) {
      ok = true;
    }
    pos++;
    if (ok != true && pos == n - 1) {
      break;
    }
    sum = 0;
  }
  if (ok) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
