#include <bits/stdc++.h>
using namespace std;
long long ans[100005];
long long sum[100005];
int main(void) {
  int n;
  scanf("%d", &n);
  bool flag = false;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &ans[i]);
    sum[i] = sum[i - 1] + ans[i];
  }
  if (sum[n] % (long long)2 || n == 1) {
    printf("NO\n");
  } else {
    for (int i = 1; i <= n; i++) {
      if (sum[i] == sum[n] / (long long)2) {
        printf("YES\n");
        return 0;
      }
    }
    long long u = sum[n] / (long long)2;
    for (int i = 1; i <= n; i++) {
      int id = -1;
      int l = 0, r = i - 1;
      while (l <= r) {
        int mid = (l + r) / 2;
        if (sum[mid] + ans[i] <= u) {
          id = mid;
          l = mid + 1;
        } else
          r = mid - 1;
      }
      if (id != -1 && sum[id] + ans[i] == u) flag = true;
      l = i + 1, r = n + 1;
      while (l <= r) {
        int mid = (l + r) / 2;
        if (sum[n] - sum[mid - 1] + ans[i] <= u) {
          id = mid;
          r = mid - 1;
        } else
          l = mid + 1;
      }
      if (id != -1 && sum[n] - sum[id - 1] + ans[i] == u) flag = true;
    }
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
