#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n;
long long a[maxn], sum[maxn];
int main() {
  cin >> n;
  sum[0] = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  if (sum[n] % 2 == 1) {
    cout << "NO" << endl;
    return 0;
  }
  long long d = sum[n] / 2;
  for (int i = 1; i <= n; ++i) {
    int low = 1, high = n, mid;
    while (low <= high) {
      mid = (low + high) / 2;
      if (sum[mid] - a[i] == d) {
        if (mid > i) {
          cout << "YES" << endl;
          return 0;
        } else
          break;
      }
      if (sum[mid] - a[i] > d) high = mid - 1;
      if (sum[mid] - a[i] < d) low = mid + 1;
    }
    low = 1;
    high = n;
    while (low <= high) {
      mid = (low + high) / 2;
      if (sum[mid] + a[i] == d) {
        if (mid < i) {
          cout << "YES" << endl;
          return 0;
        } else
          break;
      }
      if (sum[mid] + a[i] > d) high = mid - 1;
      if (sum[mid] + a[i] < d) low = mid + 1;
    }
  }
  cout << "NO" << endl;
  return 0;
}
