#include <bits/stdc++.h>
using namespace std;
vector<long long> v(111111);
map<long long, long long> l, r;
int main() {
  long long n, suml = 0, sumr = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    sumr += v[i];
    r[v[i]]++;
  }
  if (sumr % 2) return cout << "NO", 0;
  for (int i = 0; i < n; ++i) {
    suml += v[i], sumr -= v[i];
    l[v[i]]++, r[v[i]]--;
    if (sumr == suml) return cout << "YES", 0;
    if (sumr > suml)
      if ((sumr - suml) % 2 == 0)
        if (r[(sumr - suml) / 2]) return cout << "YES", 0;
    if (suml > sumr)
      if ((suml - sumr) % 2 == 0)
        if (l[(suml - sumr) / 2]) return cout << "YES", 0;
  }
  return cout << "NO", 0;
}
