#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int inf = 1e9 + 7;
inline void read(int &x) {
  x = 0;
  char ch = getchar();
  while (ch < '0') ch = getchar();
  while (ch >= '0') {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
}
multiset<long long> fr, ed;
int a[N];
int main() {
  fr.clear();
  ed.clear();
  int n;
  read(n);
  for (int i = (1); i <= (n); i++) {
    int x;
    read(x);
    a[i] = x;
    ed.insert((long long)x);
  }
  long long px = 0, py = 0;
  for (int i = (1); i <= (n); i++) py += a[i];
  if (py % 2ll == 0 && ed.count(py / 2ll)) {
    puts("YES");
    return 0;
  }
  for (int i = (1); i <= (n); i++) {
    fr.insert(a[i]);
    multiset<long long>::iterator it = ed.find(a[i]);
    ed.erase(it);
    px += a[i];
    py -= a[i];
    if (px == py) {
      puts("YES");
      return 0;
    }
    if (px > py) {
      if ((px - py) % 2ll == 0 && fr.count((px - py) / 2ll)) {
        puts("YES");
        return 0;
      }
    } else {
      if ((py - px) % 2ll == 0 && ed.count((py - px) / 2ll)) {
        puts("YES");
        return 0;
      }
    }
  }
  puts("NO");
  return 0;
}
