#include <bits/stdc++.h>
using namespace std;
int n;
long long a[100010];
long long sum = 0;
long long qian[100010];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    qian[i] = qian[i - 1] + a[i];
    sum += a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (qian[i] * 2 == sum) {
      printf("YES");
      return 0;
    }
  }
  if (sum % 2 == 1) {
    printf("NO");
    return 0;
  }
  int l, r;
  int mid;
  for (int i = 1; i <= n; i++) {
    if (a[i] == sum / 2) {
      printf("YES");
      return 0;
    }
    if (qian[i - 1] + a[i] >= sum / 2) {
      l = 0;
      r = i - 1;
      while (l < r) {
        mid = (l + r) / 2;
        if (qian[mid] + a[i] >= sum / 2)
          r = mid;
        else
          l = mid + 1;
      }
      if (qian[l] + a[i] == sum / 2) {
        printf("YES");
        return 0;
      }
    }
    if (qian[i - 1] <= sum / 2) {
      l = i + 1;
      r = n + 1;
      while (l < r) {
        mid = (l + r + 1) >> 1;
        if (qian[n] - qian[mid - 1] + a[i] < sum / 2)
          r = mid - 1;
        else
          l = mid;
      }
      if (qian[n] - qian[l - 1] + a[i] == sum / 2) {
        printf("YES");
        return 0;
      }
    }
  }
  printf("NO");
}
