#include <bits/stdc++.h>
using namespace std;
const int maxN = 100005;
int n, p;
int a[maxN];
map<long long, int> pref, suf;
int main() {
  cin >> n;
  long long s = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    suf[a[i]]++;
    s += a[i];
  }
  if (s & 1) {
    puts("NO");
    return 0;
  }
  long long cur = 0;
  for (int i = 1; i <= n; ++i) {
    cur += a[i];
    pref[a[i]]++;
    suf[a[i]]--;
    int ans = 0;
    ans |= (cur == s / 2) ? 1 : 0;
    ans |= (pref[cur - s / 2]) ? 1 : 0;
    ans |= (suf[s / 2 - cur]) ? 1 : 0;
    if (ans) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
}
