#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e5 + 10;
long long a[MaxN];
multiset<long long> left_set;
multiset<long long> right_set;
long long left_sum = 0;
long long right_sum = 0;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    right_set.insert(a[i]);
    right_sum += a[i];
  }
  for (int i = 0; i < n; ++i) {
    left_set.insert(a[i]);
    left_sum += a[i];
    right_sum -= a[i];
    right_set.erase(right_set.find(a[i]));
    if (left_sum == right_sum) {
      cout << "YES";
      return 0;
    }
    if (left_sum < right_sum) {
      if ((right_sum - left_sum) % 2 == 0) {
        if (right_set.find((right_sum - left_sum) / 2) != right_set.end()) {
          cout << "YES" << endl;
          return 0;
        }
      }
    } else {
      if ((left_sum - right_sum) % 2 == 0) {
        if (left_set.find((left_sum - right_sum) / 2) != left_set.end()) {
          cout << "YES" << endl;
          return 0;
        }
      }
    }
  }
  cout << "NO";
  return 0;
}
