#include <bits/stdc++.h>
using namespace std;
int dp[105][905];
int s[105], a[105], n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  string t;
  cin >> t;
  for (int i = 1; i <= n; ++i) {
    a[i] = t[i - 1] - '0';
    s[i] = s[i - 1] + a[i];
  }
  for (int i = 0; i <= 900; ++i) {
    dp[0][i] = 1;
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = i - 1; j >= 0; --j) {
      int x = s[i] - s[j];
      if (j == 0 && i == n) continue;
      if (dp[j][x]) dp[i][x] = 1;
    }
  }
  for (int i = 0; i <= 900; ++i) {
    if (dp[n][i]) return cout << "YES", 0;
  }
  cout << "NO";
}
