#include <bits/stdc++.h>
using namespace std;
const long long logN = 20;
const long long M = 1000000007;
const long long MM = 998244353;
const long long INF = 1e12;
const long long N = 100005;
bool sortb(pair<long long, long long> const& a,
           pair<long long, long long> const& b) {
  return a.second < b.second;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long i, a[n], s = 0, sum = 0;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      sum = sum + a[i];
    }
    if (sum % 2 != 0 || n <= 1) {
      cout << "NO" << endl;
    } else {
      map<long long, long long> mf, mb;
      for (i = 1; i < n; i++) {
        mb[a[i]]++;
      }
      long long z = 0;
      for (i = 0; i < n; i++) {
        s = s + a[i];
        if (mb[a[i]] > 0) {
          mb[a[i]]--;
        }
        if (s == sum / 2 && i < n - 1) {
          z++;
          break;
        }
        if (s < sum / 2) {
          if (mb[sum / 2 - s] > 0) {
            z++;
            break;
          }
        } else {
          if (mf[s - sum / 2] > 0) {
            z++;
            break;
          }
        }
        mf[a[i]]++;
      }
      if (z > 0) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
}
