#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 10;
long long a[M], be[M], af[M];
bool binsearch(int l, int r, long long sum, long long gg[], int pos) {
  int mid = (l + r) >> 1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (gg[mid] == sum) {
      if (pos == mid)
        return false;
      else
        return true;
    }
    if (gg[mid] > sum) r = mid - 1;
    if (gg[mid] < sum) l = mid + 1;
  }
  return false;
}
bool binsearch2(int l, int r, long long sum, long long gg[], int pos) {
  int mid = (l + r) >> 1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (gg[mid] == sum) {
      if (pos == mid)
        return false;
      else
        return true;
    }
    if (gg[mid] > sum) l = mid + 1;
    if (gg[mid] < sum) r = mid - 1;
  }
  return false;
}
int main() {
  int t;
  scanf("%d", &t);
  for (int i = 1; i <= t; i++) {
    scanf("%lld", &a[i]);
  }
  long long sum = 0;
  for (int i = 1; i <= t; i++) {
    sum += a[i];
  }
  if (sum % 2 != 0) {
    printf("NO\n");
  } else {
    be[0] = 0;
    for (int i = 1; i <= t; i++) {
      be[i] = be[i - 1] + a[i];
    }
    af[t + 1] = 0;
    for (int i = t; i >= 1; i--) {
      af[i] = af[i + 1] + a[i];
    }
    long long aim = sum / 2;
    int flag = 0;
    for (int i = 1; i <= t; i++) {
      if (be[i] == aim) {
        flag = 1;
        break;
      }
    }
    for (int i = 1; i <= t; i++) {
      if (flag) break;
      bool temp = binsearch(0, i, aim - a[i], be, i);
      if (temp) {
        flag = 1;
        break;
      }
      temp = binsearch2(i, t + 1, aim - a[i], af, i);
      if (temp) {
        flag = 1;
        break;
      }
    }
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
