#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
using UI = unsigned int;
using UC = unsigned char;
using VI = std::vector<int>;
using SI = std::set<int>;
using PI = std::pair<int, int>;
using PL = std::pair<LL, LL>;
constexpr LL MOD = 1000000009;
constexpr double EXP = 2.7182818284590452;
constexpr double Pi = 3.1415926535;
constexpr long double EPS = 1e-4;
constexpr int INF = 1000 * 1000 * 1001;
constexpr long long INFL = (LL)INF * (LL)INF;
inline LL gcd(LL a, LL b) {
  if (a < b) swap(a, b);
  while (b != 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
inline LL lcm(LL a, LL b) { return (a / gcd(a, b)) * b; }
LL extgcd(LL a, LL b, LL& x, LL& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  LL x11, y11;
  LL d = extgcd(b % a, a, x11, y11);
  x = y11 - (b / a) * x11;
  y = x11;
  return d;
}
ULL poww(ULL v, ULL p, ULL mod) {
  if (p == 0) return 1;
  if (p & 1) {
    return (poww(v, p - 1, mod) * v) % mod;
  } else {
    ULL t = poww(v, p >> 1L, mod);
    return (t * t) % mod;
  }
}
constexpr ULL L31018 = 3000000000000000000L;
constexpr ULL L1018 = 1000000000000000000L;
constexpr int MAXN = 100005;
int n;
LL sum[MAXN];
LL tmp;
int arr[MAXN];
multiset<LL> sl, sr;
LL get_sum(int l, int r) { return sum[r] - sum[l]; }
bool is = false;
void accept() {
  cin >> n;
  for (int i = (1); i < (n + 1); ++i) {
    scanf("%d", arr + i);
    sum[i] = arr[i];
    sr.insert(2L * arr[i]);
  }
  for (int i = (1); i < (n + 1); ++i) {
    sum[i] += sum[i - 1];
  }
  for (int i = (1); i < (n + 1); ++i) {
    tmp = 2L * get_sum(0, i - 1) - get_sum(0, n);
    if (tmp == 0 || sr.find(-tmp) != sr.end() || sl.find(tmp) != sl.end()) {
      is = true;
      break;
    }
    sr.erase(sr.find(2L * arr[i]));
    sl.insert(2L * arr[i]);
  }
  is = is || get_sum(0, n) == 0 || sl.find(get_sum(0, n)) != sl.end();
  if (is) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
int main(void) {
  accept();
  return 0;
}
