#include <bits/stdc++.h>
using namespace std;
const long long maxN = 2e5 + 12;
const long long INF = 1e18 + 12;
const long long Inf = 1e9 + 12;
const long long mod = 1e9 + 7;
long long n, k = 1, y, a[maxN], sum, w, ans[maxN];
set<long long> s;
void YES() {
  cout << "YES" << endl;
  exit(0);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum % 2 || n < 2) {
    cout << "NO" << endl;
    return 0;
  }
  long long cnt = sum;
  for (long long i = n; i >= 1; i--) {
    s.insert(cnt);
    if (cnt == sum / 2) YES();
    if (s.find(a[i] + sum / 2) != s.end()) YES();
    cnt -= a[i];
  }
  s.clear();
  cnt = sum;
  for (long long i = 1; i <= n; i++) {
    s.insert(cnt);
    if (cnt == sum / 2) YES();
    if (s.find(a[i] + sum / 2) != s.end()) YES();
    cnt -= a[i];
  }
  cout << "NO" << endl;
}
