#include <bits/stdc++.h>
using namespace std;
long long n, a[100005], sum = 0;
void reset() {}
void input() {
  cin >> n;
  for (long long(i) = (1); (i) <= (n); (i)++) {
    cin >> a[i];
    sum += a[i];
  }
}
void solve() {
  map<long long, bool> check;
  long long total = 0;
  for (long long(i) = (1); (i) <= (n); (i)++) {
    check[a[i]] = 1;
    total += a[i];
    if (check.count((total - (sum - total)) / 2) &&
        (total - (sum - total)) % 2 == 0) {
      cout << "YES" << endl;
      return;
    }
  }
  check.clear();
  total = 0;
  for (long long(i) = (n); (i) >= (1); (i)--) {
    check[a[i]] = 1;
    total += a[i];
    if (check.count((total - (sum - total)) / 2) &&
        (total - (sum - total)) % 2 == 0) {
      cout << "YES" << endl;
      return;
    }
  }
  cout << "NO" << endl;
}
void LetsRock() { solve(); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  input();
  reset();
  LetsRock();
  return 0;
}
