#include <bits/stdc++.h>
using namespace std;
bool find(long long int s[], int u, int v, long long int elem) {
  int mid, u1, v1;
  long long int sum = s[v] / 2 + elem;
  if (s[u] == sum) return true;
  u1 = 0;
  v1 = u - 1;
  u = u + 1;
  while (u <= v) {
    mid = (u + v) / 2;
    if (s[mid] == sum)
      break;
    else if (s[mid] < sum)
      u = mid + 1;
    else
      v = mid - 1;
  }
  if (s[mid] == sum) return true;
  sum -= 2 * elem;
  while (u1 <= v1) {
    mid = (u1 + v1) / 2;
    if (s[mid] == sum)
      break;
    else if (s[mid] < sum)
      u1 = mid + 1;
    else
      v1 = mid - 1;
  }
  return s[mid] == sum;
}
int main() {
  int n;
  cin >> n;
  long long s[n], a[n];
  string ans = "NO";
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0)
      s[i] = a[i];
    else
      s[i] = s[i - 1] + a[i];
  };
  if (s[n - 1] % 2 == 0 && n > 1) {
    for (int i = 0; i < n; i++) {
      if (find(s, i, n - 1, a[i])) {
        ans = "YES";
        break;
      }
    }
  }
  cout << ans;
  return 0;
}
