#include <bits/stdc++.h>
using namespace std;
long long a[100000], b[100000], n, t, r;
void y() {
  partial_sum(a, a + n, b);
  r |= binary_search(b, b + n, t);
  for (int i = 0; i < n && b[i] - a[i] < t; i++)
    r |= binary_search(b, b + n, t + a[i]);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], t += a[i];
  if (t % 2 == 0) t /= 2, y(), reverse(a, a + n), y();
  cout << (r ? "YES" : "NO");
}
