#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long a[N];
int main() {
  int n;
  cin >> n;
  long long sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum % 2) {
    cout << "NO";
    return 0;
  }
  sum /= 2;
  multiset<long long> l, r;
  for (int i = 0; i < n; ++i) r.insert(a[i]);
  for (int i = 0; i < n; ++i) {
    l.insert(a[i]);
    r.erase(r.find(a[i]));
    sum -= a[i];
    if (sum == 0 or l.find(-sum) != l.end() or r.find(sum) != r.end()) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
