#include <bits/stdc++.h>
using namespace std;
int n;
int ar[100010];
long long psum[100010];
long long total, halftotal;
bool binser(int po) {
  long long target = halftotal - ar[po];
  int l = 0, r = po - 1;
  int m;
  while (l <= r) {
    m = r - (r - l) / 2;
    if (psum[m] > target)
      r = m - 1;
    else if (psum[m] < target)
      l = m + 1;
    else
      return 1;
  }
  target = halftotal + ar[po];
  l = po + 1, r = n;
  while (l <= r) {
    m = r - (r - l) / 2;
    if (psum[m] > target)
      r = m - 1;
    else if (psum[m] < target)
      l = m + 1;
    else
      return 1;
  }
  return 0;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> ar[i];
    psum[i] = psum[i - 1] + ar[i];
    total += ar[i];
  }
  if (total & 1) {
    cout << "NO\n";
    return 0;
  }
  halftotal = total / 2;
  for (int i = 1; i <= n; ++i) {
    if (binser(i)) {
      cout << "YES\n";
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
