#include <bits/stdc++.h>
using namespace std;
const long long N = 100;
inline long long read() {
  long long s = 0;
  register bool neg = 0;
  register char c = getchar();
  for (; c < '0' || c > '9'; c = getchar()) neg |= (c == '-');
  for (; c >= '0' && c <= '9'; s = s * 10 + (c ^ 48), c = getchar())
    ;
  s = (neg ? -s : s);
  return s;
}
long long a, s[N + 10], p;
inline bool check(long long n, long long m, bool q) {
  m += s[n];
  if (n > a) {
    if (!m && q) return 1;
    return 0;
  }
  if (m > p) return 0;
  if (m == p) m -= p, q = 1;
  return check(n + 1, m, q);
}
signed main() {
  a = read();
  for (long long i = 1; i <= a; i++) s[i] = getchar() - '0';
  for (long long i = 1; i < a; i++) {
    p += s[i];
    if (check(i + 1, 0, 0)) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
  return 0;
}
