#include <bits/stdc++.h>
using namespace std;
int n;
long long sum;
int a[100001];
map<long long, int> st1, st2;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), sum += a[i];
  if (sum & 1) {
    printf("NO\n");
    return 0;
  }
  for (int i = 1; i <= n; ++i) ++st2[a[i]];
  long long nowsum = 0;
  sum >>= 1;
  int fg = 0;
  for (int i = 1; i <= n; ++i) {
    nowsum += a[i];
    ++st1[a[i]], --st2[a[i]];
    if (nowsum == sum) {
      fg = 1;
      break;
    } else {
      if (nowsum < sum) {
        if (st2[sum - nowsum]) {
          fg = 1;
          break;
        }
      } else {
        if (st1[nowsum - sum]) {
          fg = 1;
          break;
        }
      }
    }
  }
  printf(fg ? "YES\n" : "NO\n");
  return 0;
}
