#include <bits/stdc++.h>
using namespace std;
void sd(int &number) {
  bool negative = false;
  register int c;
  number = 0;
  c = getchar();
  if (c == '-') {
    negative = true;
    c = getchar();
  }
  for (; (c > 47 && c < 58); c = getchar()) number = number * 10 + c - 48;
  if (negative) number *= -1;
}
signed main() {
  long long int n;
  scanf("%lld", &(n));
  long long int a[n];
  long long int b = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &(a[i]));
    b += a[i];
  }
  if (b % 2 == 1)
    printf("NO");
  else {
    long long int c = 0;
    map<long long int, long long int> m1, m2;
    for (int i = 0; i < n; i++) {
      if (m1.find(a[i]) == m1.end()) {
        m1.insert(make_pair(a[i], 1));
        m2.insert(make_pair(a[i], 1));
      } else {
        m1[a[i]]++;
        m2[a[i]]++;
      }
    }
    long long int i = 0;
    while (c < b / 2) {
      if (m1.find(b / 2 - c) != m1.end() && m1[b / 2 - c] > 0) {
        printf("YES");
        return 0;
      } else {
        m1[a[i]]--;
        c += a[i];
        i++;
      }
    }
    c = 0;
    i = n - 1;
    while (c < b / 2) {
      if (m2.find(b / 2 - c) != m2.end() && m2[b / 2 - c] > 0) {
        printf("YES");
        return 0;
      } else {
        m2[a[i]]--;
        c += a[i];
        i--;
      }
    }
    printf("NO");
  }
  return 0;
}
