#include <bits/stdc++.h>
using namespace std;
const int Inf = 1 << 30;
const int N = 1e5 + 10;
int n;
long long a[N];
long long pre[N];
map<long long, int> q1;
map<long long, int> q2;
int main() {
  while (~scanf("%d", &n)) {
    q1.clear();
    q2.clear();
    memset(a, 0, sizeof(a));
    memset(pre, 0, sizeof(pre));
    for (int i = 1; i <= n; i++) {
      scanf("%I64d", &a[i]);
      pre[i] = pre[i - 1] + a[i];
      q1[a[i]]++;
    }
    if (pre[n] & 1) {
      puts("NO");
      continue;
    }
    bool flag = 0;
    long long t = 0;
    for (int i = 0; i <= n; i++) {
      if (i) {
        q2[a[i]]++;
        q1[a[i]]--;
      }
      t = abs(pre[n] - pre[i] * 2ll);
      if (t & 1) continue;
      if (pre[n] - pre[i] > pre[i] && q1[t / 2]) flag = 1;
      if (pre[n] - pre[i] < pre[i] && q2[t / 2]) flag = 1;
      if (pre[n] - pre[i] == pre[i]) flag = 1;
      if (flag) break;
    }
    if (flag)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
