#include <bits/stdc++.h>
using namespace std;
map<long long, long long> c;
map<long long, long long> d;
long long n, a[100005], b[100005], sum;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i], b[i] = b[i - 1] + a[i], d[a[i]]++;
  }
  if (sum % 2 != 0) {
    cout << "NO";
    return 0;
  }
  sum /= 2, c[0] = 1;
  for (int i = 1; i <= n; i++) {
    c[a[i]]++, d[a[i]]--;
    if (d[a[i]] == 0) d.erase(a[i]);
    if (b[i] >= sum) {
      if (c[b[i] - sum]) {
        cout << "YES";
        return 0;
      }
    } else {
      if (d[sum - b[i]]) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
