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