#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7, n, k;
int main() {
  scanf("%lld", &n);
  long long a[n + 1], sum = 0;
  map<long long, long long> pref, suff;
  for (long long i = 0; i < n; i++)
    scanf("%lld", &a[i]), sum += a[i], pref[a[i]]++;
  if (sum % 2) {
    printf("NO\n");
    return 0;
  }
  sum /= 2;
  long long currSum = 0, flag = 0;
  for (long long i = 0; i < n; i++) {
    currSum += a[i];
    pref[a[i]]--;
    suff[a[i]]++;
    long long req = sum - currSum;
    if (pref[req]) {
      flag = 1;
      break;
    }
    if (suff[-req]) {
      flag = 1;
      break;
    }
  }
  if (flag) {
    printf("YES\n");
    return 0;
  }
  printf("NO\n");
}
