#include <bits/stdc++.h>
using namespace std;
long long a[100005];
int main() {
  long long n, sum = 0;
  bool valid = true;
  map<long long, long long> m, mRev;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
    sum += a[i];
  }
  mRev = m;
  long long sumRev = sum;
  if (sum % 2 != 0) {
    cout << "NO\n";
    return 0;
  } else {
    sum /= 2;
    long long tempSum = 0;
    if (m[sum] != 0) {
      cout << "YES\n";
      return 0;
    }
    for (int i = 0; i < n; i++) {
      m[a[i]]--;
      tempSum += a[i];
      if (tempSum == sum) {
        cout << "YES\n";
        return 0;
      } else if (tempSum > sum) {
        break;
      } else {
        long long reqd = sum - tempSum;
        if (m[reqd] != 0) {
          cout << "YES\n";
          return 0;
        }
      }
    }
  }
  sumRev /= 2;
  long long tempSum = 0;
  for (int i = n - 1; i >= 0; i--) {
    mRev[a[i]]--;
    tempSum += a[i];
    if (tempSum == sum) {
      cout << "YES\n";
      return 0;
    } else if (tempSum > sum) {
      break;
    } else {
      long long reqd = sumRev - tempSum;
      if (mRev[reqd] != 0) {
        cout << "YES\n";
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
