Recently Vasya found a golden ticket — a sequence which consists of n digits a_1a_2... a_n. Vasya considers a ticket to be lucky if it can be divided into two or more non-intersecting segments with equal sums. For example, ticket 350178 is lucky since it can be divided into three segments 350, 17 and 8: 3+5+0=1+7=8. Note that each digit of sequence should belong to exactly one segment.

Help Vasya! Tell him if the golden ticket he found is lucky or not.

Input

The first line contains one integer n (2 ≤ n ≤ 100) — the number of digits in the ticket.

The second line contains n digits a_1 a_2 ... a_n (0 ≤ a_i ≤ 9) — the golden ticket. Digits are printed without spaces.

Output

If the golden ticket is lucky then print "YES", otherwise print "NO" (both case insensitive).

Examples

Input

5
73452


Output

YES


Input

4
1248


Output

NO

Note

In the first example the ticket can be divided into 7, 34 and 52: 7=3+4=5+2.

In the second example it is impossible to divide ticket into segments with equal sum.
#include <bits/stdc++.h>
using namespace std;
template <class Type>
Type max_in_array(vector<Type> arr) {
  Type m = arr[0];
  for (auto i : arr)
    if (i > m) m = i;
  return m;
}
template <class Type>
Type min_in_array(vector<Type> arr) {
  Type m = arr[0];
  for (auto i : arr)
    if (i < m) m = i;
  return m;
}
template <class Type>
long long sum_of_array(vector<Type> arr) {
  long long m = 0;
  for (auto i : arr) m += i;
  return m;
}
template <class Type>
Type binpow(Type value, int pow) {
  Type res = 1;
  while (pow) {
    if (pow & 1) res *= value;
    value *= value;
    pow >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class Type>
struct Sqrt_deque {
  deque<Type> deq;
  Type max_elem;
  long long ind_max;
  Type min_elem;
  long long ind_min;
};
template <class Type>
deque<Sqrt_deque<Type>> deque_to_sqrt(
    deque<Type> deq, long long max_size,
    const function<bool(Type* el1, Type* el2)> larger1then2 =
        [](long long* el1, long long* el2) { return *el1 > *el2; }) {
  deque<Sqrt_deque<Type>> sqrt_deq;
  long long s_size = min((long long)round(sqrt(deq.size())), max_size);
  while (!deq.empty()) {
    Sqrt_deque<Type> s_deq;
    Type elem = deq.front();
    s_deq.max_elem = elem;
    s_deq.ind_max = 0;
    s_deq.min_elem = elem;
    s_deq.ind_min = 0;
    s_deq.deq.push_back(elem);
    deq.pop_front();
    if (deq.size() <= s_size - 1) {
      long long ind = 1;
      while (!deq.empty()) {
        Type elem = deq.front();
        if (larger1then2(&elem, &s_deq.max_elem)) {
          s_deq.max_elem = elem;
          s_deq.ind_max = ind;
        }
        if (larger1then2(&s_deq.min_elem, &elem)) {
          s_deq.min_elem = elem;
          s_deq.ind_min = ind;
        }
        s_deq.deq.push_back(elem);
        deq.pop_front();
        ind++;
      }
    } else {
      for (long long i = 1; i < s_size; i += 1) {
        Type elem = deq.front();
        if (larger1then2(&elem, &s_deq.max_elem)) {
          s_deq.max_elem = elem;
          s_deq.ind_max = i;
        }
        if (larger1then2(&s_deq.min_elem, &elem)) {
          s_deq.min_elem = elem;
          s_deq.ind_min = i;
        }
        s_deq.deq.push_back(elem);
        deq.pop_front();
      }
    }
    sqrt_deq.push_back(s_deq);
  }
  return sqrt_deq;
}
int main() {
  int n;
  cin >> n;
  string st;
  cin >> st;
  vector<int> a;
  for (auto i : st) a.push_back((int)i - 48);
  for (long long i = 1; i < n; i += 1) {
    int s = 0;
    for (long long j = 0; j < i; j += 1) s += a[j];
    int ps = 0;
    bool was = false;
    for (long long j = i; j < n; j += 1) {
      ps += a[j];
      if (ps == s) {
        ps = 0;
        was = true;
      }
    }
    if (ps == 0 && was) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
