#include <bits/stdc++.h>
using namespace std;
void openFiles() {}
void IOoptimize() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int MAXN = 110;
const int MAXSUM = MAXN * 10 + 100;
int dp[MAXN][MAXSUM];
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  memset(dp, 255, sizeof(dp));
  for (int i = 0; i < MAXSUM; ++i) {
    dp[0][i] = 0;
  }
  for (int i = 1; i <= n; ++i) {
    int sum = 0;
    for (int j = 1; i - j >= 0; ++j) {
      sum += s[i - j] - '0';
      if (dp[i - j][sum] != -1) {
        dp[i][sum] = max(dp[i - j][sum] + 1, dp[i][sum]);
      }
    }
  }
  for (int i = 0; i < MAXSUM; ++i) {
    if (dp[n][i] > 1) {
      cout << "YES\n";
      return;
    }
  }
  cout << "NO\n";
}
int main() {
  openFiles();
  IOoptimize();
  solve();
  return 0;
}
