#include <bits/stdc++.h>
using namespace std;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;
const int N = 1e5 + 10;
int n, a[N];
long long s[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i), s[i] = s[i - 1] + a[i];
  if (s[n] % 2) printf("no\n"), exit(0);
  set<long long> cur;
  for (int i = 1; i <= n; i++) {
    cur.insert(1ll * a[i]);
    if (s[i] > s[n] / 2 && cur.find(s[i] - s[n] / 2) != cur.end())
      printf("yes\n"), exit(0);
  }
  cur.clear();
  for (int i = n; i > 0; i--) s[i] = s[i + 1] + a[i];
  for (int i = n; i > 0; i--) {
    cur.insert(1ll * a[i]);
    if (s[i] > s[1] / 2 && cur.find(s[i] - s[1] / 2) != cur.end())
      printf("yes\n"), exit(0);
  }
  printf("no\n");
}
