#include <bits/stdc++.h>
using namespace std;
int main() {
  map<long long, long long> p, s;
  int n;
  cin >> n;
  long long arr[n], sum = 0, pre = 0, c;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    s[arr[i]]++;
    sum += arr[i];
  }
  if (sum & 1) {
    puts("NO");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    pre += arr[i];
    c = (sum / 2) - pre;
    p[arr[i]]++;
    s[arr[i]]--;
    if ((c > 0 && s[c] > 0) || (c < 0 && p[-c] > 0) || !c) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
  return 0;
}
