#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
long long int a[100005];
long long int sum[100005];
set<long long int> s;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  while (cin >> n) {
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
      if (!i)
        sum[i] = a[i];
      else
        sum[i] = sum[i - 1] + a[i];
    }
    if (sum[n - 1] & 1)
      cout << "NO\n";
    else {
      long long int want = sum[n - 1] >> 1;
      bool good = 0;
      for (int i = 0; i < n; ++i) {
        s.insert(a[i]);
        if (sum[i] >= want) {
          if (s.count(sum[i] - want)) good = 1;
        }
      }
      s.clear();
      for (int i = n - 1; i >= 0; --i) {
        if (sum[i] < want) {
          if (s.count(want - sum[i])) good = 1;
        }
        s.insert(a[i]);
      }
      if (!good)
        cout << "NO\n";
      else
        cout << "YES\n";
    }
    s.clear();
  }
  return 0;
}
