#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 4e6 + 10;
const long long INF = 1e18 + 0;
long long a[N];
multiset<long long> l, r;
void go() {
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long rsum = 0, lsum = 0;
  for (int i = 0; i < n; i++) rsum += a[i];
  for (int i = 0; i < n; i++) r.insert(a[i]);
  for (int i = 0; i < n; i++) {
    auto it = r.find(a[i]);
    r.erase(it);
    l.insert(a[i]);
    rsum -= a[i];
    lsum += a[i];
    if (rsum == lsum) {
      cout << "YES" << endl;
      return;
    }
    if (rsum > lsum) {
      long long d = rsum - lsum;
      if (d % 2 == 0 && r.find(d / 2) != r.end()) {
        cout << "YES" << endl;
        return;
      }
    } else {
      long long d = lsum - rsum;
      if (d % 2 == 0 && l.find(d / 2) != l.end()) {
        cout << "YES" << endl;
        return;
      }
    }
  }
  cout << "NO" << endl;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    go();
  }
}
