#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e11 + 2;
const int INF = (int)1e6 + 2;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
const int MAX = 100001;
int n;
long long v[MAX];
int main() {
  scanf("%d", &n);
  long long sum(0);
  map<long long, int> mp1, mp2;
  for (int i = 0; i < n; ++i) scanf("%d", &v[i]), mp1[v[i]]++, sum += v[i];
  if (sum & 1) {
    puts("NO");
    return 0;
  }
  long long get_now(0), need;
  for (int i = 0; i < n; ++i) {
    get_now += v[i];
    need = (sum / 2) - get_now;
    mp1[v[i]]--;
    mp2[v[i]]++;
    if (need == 0 || (need > 0 && mp1[need] > 0) ||
        (need < 0 && mp2[-need] > 0)) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
  return 0;
}
