#include <bits/stdc++.h>
long long int pow1(long long int, long long int);
using namespace std;
int main() {
  long long int n, total, i, x, curr;
  multiset<long long int> ms;
  multiset<long long int>::iterator itr;
  vector<long long int> vec;
  cin >> n;
  total = 0;
  for (i = 0; i < n; ++i) {
    cin >> x;
    vec.push_back(x);
    total += x;
  }
  if (total % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  curr = 0;
  for (i = 0; i < n; ++i) {
    curr += vec[i];
    if (curr == total / 2) {
      cout << "YES" << endl;
      return 0;
    }
    ms.insert(vec[i]);
    if (curr > total / 2) {
      itr = ms.find(curr - total / 2);
      if (itr != ms.end()) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  ms.clear();
  curr = 0;
  for (i = n - 1; i >= 0; i--) {
    curr += vec[i];
    if (curr == total / 2) {
      cout << "YES" << endl;
      return 0;
    }
    ms.insert(vec[i]);
    if (curr > total / 2) {
      itr = ms.find(curr - total / 2);
      if (itr != ms.end()) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
long long int pow1(long long int a, long long int b) {
  long long int ans = 1;
  while (b) {
    if (b & 1) {
      ans = ans * a;
    }
    a = a * a;
    b = b >> 1;
  }
  return ans;
}
