#include <bits/stdc++.h>
using namespace std;
int n;
string s;
bool dp[105][9 * 100 + 5][2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  s = '#' + s;
  for (int i = 1; i <= n; i++) {
    int cur = s[i] - '0';
    for (int j = i - 1; j >= 1; j--) {
      if (dp[j][cur][0]) {
        dp[i][cur][1] = true;
      }
      if (dp[j][cur][1]) {
        dp[i][cur][1] = true;
      }
      cur += s[j] - '0';
    }
    dp[i][cur][0] = true;
  }
  for (int i = 0; i <= 900; i++) {
    if (dp[n][i][1] == true) {
      return cout << "YES", 0;
    }
  }
  cout << "NO";
}
