#include <bits/stdc++.h>
using namespace std;
int const N = 2000001;
int n, v[N];
map<int, int> f;
int main() {
  scanf("%d", &n);
  long long sm = 0, fs = 0, need = 0;
  multiset<int> sf, pf;
  for (int i = 0; i < n; ++i) {
    scanf("%d", v + i);
    sm += v[i];
    sf.insert(v[i]);
  }
  if (sm & 1) {
    return puts("NO"), 0;
  }
  need = sm / 2;
  bool ok = false;
  for (int i = 0; i < n; ++i) {
    sm -= v[i];
    fs += v[i];
    sf.erase(sf.find(v[i]));
    pf.insert(v[i]);
    if (sm == fs && sm == need) {
      ok = true;
      break;
    }
    if (fs < need) {
      int w = need - fs;
      auto it = sf.lower_bound(w);
      if (it != sf.end() && *it == w && sm - w == need) {
        ok = true;
        break;
      }
    }
    if (sm < need) {
      int w = need - sm;
      auto it = pf.lower_bound(w);
      if (it != pf.end() && *it == w && fs - w == need) {
        ok = true;
        break;
      }
    }
  }
  if (ok)
    puts("YES");
  else
    puts("NO");
}
