#include <bits/stdc++.h>
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long countDivisor(long long n) {
  long long divisor = 0;
  for (long long i = 1; i * i <= n; i++) {
    if (i * i == n)
      divisor += 1;
    else if (n % i == 0)
      divisor += 2;
  }
  return divisor;
}
int bmod(int a, int b, int m) {
  if (b == 0) return 1;
  int x = bmod(a, b / 2, m);
  x = (x * x) % m;
  if (b % 2 == 1) x = (x * a) % m;
  return x;
}
long long powr(long long n, long long m) {
  long long ans = 1;
  for (long long i = 1; i <= m; i++) ans *= n;
  return ans;
}
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
long long fx[4] = {+0, +0, +1, -1};
long long fy[4] = {+1, -1, +0, +0};
using namespace std;
long long n, arr[100000 + 5], sum[100000 + 1];
long long total;
bool check(long long l, long long r, long long num) {
  long long mid;
  while (l <= r) {
    mid = l + (r - l) / 2;
    if (sum[mid] == num) return true;
    if (sum[mid] > num)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
    total += arr[i];
    sum[i] = arr[i];
    if (i) sum[i] += sum[i - 1];
  }
  if (total % 2) {
    cout << "NO";
    return 0;
  }
  total /= 2;
  for (long long i = 0; i < n; i++) {
    if (check(i + 1, n - 1, total + arr[i]) ||
        check(0LL, i - 1, total - arr[i])) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
