#include <bits/stdc++.h>
using namespace std;
int64_t n, a[100005];
map<int64_t, int64_t> mpl, mpr;
int32_t main() {
  scanf("%I64d", &n);
  int64_t sum = 0;
  mpr[0]++;
  for (int64_t i = 1; i <= n; i++)
    scanf("%I64d", &a[i]), sum += a[i], mpr[a[i]]++;
  if (sum & 1) {
    puts("NO");
    return 0;
  }
  sum >>= 1;
  mpl[0]++;
  int64_t pref = 0;
  for (int64_t i = 1; i <= n; i++) {
    mpl[a[i]]++;
    mpr[a[i]]--;
    pref += a[i];
    if (mpr[a[i]] <= 0) mpr.erase(a[i]);
    if (mpl.find(pref - sum) != mpl.end() ||
        mpr.find(sum - pref) != mpr.end()) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
}
