#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 100;
multiset<long long> l;
long long n;
vector<long long> pref(MAXN);
void check(vector<long long>& a) {
  for (long long i = 0; i < n; ++i) {
    l.insert(a[i]);
    if (l.count(pref[i] - pref[n - 1] / 2)) {
      cout << "YES";
      exit(0);
    }
  }
  l.clear();
}
signed main() {
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  pref[0] = a.front();
  for (long long i = 1; i < n; ++i) pref[i] = pref[i - 1] + a[i];
  if (pref[n - 1] & 1) {
    cout << "NO";
    return 0;
  }
  check(a);
  reverse(a.begin(), a.end());
  pref[0] = a.front();
  for (long long i = 1; i < n; ++i) pref[i] = pref[i - 1] + a[i];
  check(a);
  cout << "NO";
  return 0;
}
