#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5;
long long arr[MAX], pref[MAX], suf[MAX];
int n;
int main() {
  scanf("%d", &n);
  for (int i = int(1); i < int(n + 1); i++) {
    scanf("%lld", arr + i);
  }
  for (int i = int(1); i < int(n + 1); i++) {
    pref[i] = pref[i - 1] + arr[i];
  }
  for (int i = int(n); i >= int(1); i--) {
    suf[i] = suf[i + 1] + arr[i];
  }
  multiset<long long> to_right, to_left;
  for (int i = int(1); i < int(n + 1); i++) {
    to_right.insert(arr[i]);
  }
  bool good = false;
  for (int i = int(0); i < int(n); i++) {
    if (i > 0) {
      long long cur = arr[i];
      to_right.erase(to_right.find(cur));
      to_left.insert(cur);
    }
    if (pref[i] == suf[i + 1]) {
      good = true;
    } else {
      if (suf[i + 1] > pref[i]) {
        long long d = suf[i + 1] - pref[i];
        if (d % 2 == 0 && to_right.count(d / 2)) {
          good = true;
        }
      } else {
        long long d = pref[i] - suf[i + 1];
        if (d % 2 == 0 && to_left.count(d / 2)) {
          good = true;
        }
      }
    }
  }
  puts(good ? "YES" : "NO");
  return 0;
}
