#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 100;
const long long mod = 1e9 + 7;
const long long base = 500;
map<long long, long long> mp;
long long a[maxn];
long long t = 0;
long long n;
void sol() {
  mp.clear();
  long long p = t / 2;
  long long h = 0;
  for (int i = 1; i <= n; i++) {
    mp[a[i]]++;
    h += a[i];
    if (mp[h - p]) {
      cout << "YES"
           << "\n";
      exit(0);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  if (fopen("Farm.INP", "r")) {
    freopen("Farm.INP", "r", stdin);
    freopen("Farm.OUT", "w", stdout);
  }
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    t += a[i];
  }
  if (t % 2 == 1) {
    cout << "NO";
    return 0;
  }
  sol();
  reverse(a + 1, a + n + 1);
  sol();
  cout << "NO";
  return 0;
}
