#include <bits/stdc++.h>
using namespace std;
map<long long, int> mp1, mp2;
long long arr[100001];
int main() {
  int n, i;
  long long total = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    total += arr[i];
    mp1[arr[i]]++;
  }
  if (total % 2 || n == 1) {
    cout << "NO\n";
    return 0;
  }
  long long half = total / 2;
  long long shalf = 0;
  for (i = 0; i < n; i++) {
    shalf += arr[i];
    mp1[arr[i]]--;
    mp2[arr[i]]++;
    cerr << half << " " << shalf << " " << mp1[half - shalf] << endl;
    if (half == shalf) {
      cout << "YES\n";
      return 0;
    }
    if (half > shalf && mp1[half - shalf]) {
      cout << "YES\n";
      return 0;
    }
    if (shalf > half && mp2[shalf - half]) {
      cout << "YES\n";
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
