#include <bits/stdc++.h>
using namespace std;
int arr[100005];
set<int> st;
set<int>::iterator itlow;
bool solve(int &n, long long &half) {
  long long sum;
  sum = 0;
  st.clear();
  for (int i = 0; i < n; ++i) {
    sum += arr[i];
    st.insert(arr[i]);
    if (sum < half) {
      continue;
    }
    if (sum == half) {
      return true;
    }
    itlow = st.lower_bound(sum - half);
    if (itlow != st.end() && *itlow == sum - half) {
      return true;
    }
  }
  sum = 0;
  st.clear();
  for (int i = n - 1; i >= 0; --i) {
    sum += arr[i];
    st.insert(arr[i]);
    if (sum < half) {
      continue;
    }
    if (sum == half) {
      return true;
    }
    itlow = st.lower_bound(sum - half);
    if (itlow != st.end() && *itlow == sum - half) {
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  long long half = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    half += arr[i];
  }
  if (half % 2 != 0) {
    cout << "NO" << endl;
    return 0;
  }
  half = half / 2;
  if (solve(n, half)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
