#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, k;
  cin >> n;
  vector<long long int> a(n), p(n);
  for (i = 0; i < n; i++) cin >> a[i];
  p[0] = a[0];
  for (i = 1; i < n; i++) p[i] = a[i] + p[i - 1];
  long long int s = p[n - 1];
  if (p[n - 1] % 2 > 0 or n == 1) return cout << "NO", 0;
  for (i = 0; i < n; i++) {
    if (binary_search(p.begin() + i + 1, p.end(), s / 2 + a[i]))
      return cout << "YES", 0;
    if (binary_search(p.begin(), p.begin() + i, s / 2 - a[i]))
      return cout << "YES", 0;
  }
  cout << "NO";
}
