#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const double eps = 1e-9;
const int inf = 1e9;
map<long long, set<int> > M;
long long a[N];
int main() {
  int n;
  scanf("%d", &n);
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld", a + i);
    sum += a[i];
    M[a[i]].insert(i);
  }
  if (sum & 1) {
    printf("NO");
    return 0;
  }
  long long half = sum / 2;
  if (M[half].size() > 0) {
    printf("YES");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    half -= a[i];
    if (!half) {
      printf("YES");
      return 0;
    }
    auto p = M[half].upper_bound(i);
    if (p == M[half].end()) continue;
    printf("YES");
    return 0;
  }
  half = sum / 2;
  for (int i = n - 1; i > -1; i--) {
    half -= a[i];
    if (!half) {
      printf("YES");
      return 0;
    }
    auto p = M[half].lower_bound(i);
    if (p == M[half].begin()) continue;
    printf("YES");
    return 0;
  }
  printf("NO");
}
