#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
int n;
int tab[N + 7];
long long S = 0;
bool solve() {
  set<long long> wars;
  long long sum = 0;
  for (int i = 1; i <= n; ++i) {
    sum += tab[i];
    if (sum >= S) {
      if (sum == S || wars.find(sum - S) != wars.end()) {
        return true;
      }
    }
    wars.insert(tab[i]);
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> tab[i];
    S += tab[i];
  }
  if (S % 2 == 1) {
    cout << "NO\n";
    return 0;
  }
  S /= 2;
  if (solve())
    cout << "YES\n";
  else {
    reverse(tab + 1, tab + n + 1);
    if (solve())
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
