#include <bits/stdc++.h>
using namespace std;
long long v[100005];
int i, n;
map<long long, int> mapa, mapa2;
int main() {
  scanf("%d", &n);
  long long sum = 0LL, at = 0LL, aux;
  for (i = 0; i < n; i++) scanf("%lld", &v[i]), mapa[v[i]]++, sum += v[i];
  for (i = 0; i < n; i++) {
    at += v[i];
    mapa[v[i]]--;
    mapa2[v[i]]++;
    if (2 * at == sum) {
      printf("YES\n");
      return 0;
    } else if (2 * at < sum && ((sum - 2 * at) % 2 == 0)) {
      aux = (sum - 2LL * at) / 2;
      if (mapa.count(aux) && mapa[aux] > 0) {
        printf("YES\n");
        return 0;
      }
    } else if (2 * at > sum && ((2 * at - sum) % 2 == 0)) {
      aux = (2 * at - sum) / 2;
      if (mapa2.count(aux)) {
        printf("YES\n");
        return 0;
      }
    }
  }
  printf("NO\n");
}
