#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
int n;
vector<long long int> arr(N + 1, 0);
vector<long long int> sum1(N + 1, 0);
vector<long long int> sum2(N + 1, 0);
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> n;
  long long int x = 0;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    sum1[i] = sum1[i - 1] + arr[i];
    x += arr[i];
  }
  for (int i = 1; i <= n; i++) sum2[i] = sum2[i - 1] + arr[n - i + 1];
  if (x % 2 == 1) {
    cout << "NO";
    return 0;
  }
  int l = 1, r = n;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (sum1[mid] == x / 2) {
      cout << "YES";
      return 0;
    } else if (sum1[mid] > x / 2)
      r = mid - 1;
    else
      l = mid + 1;
  }
  for (int i = 1; i <= n; i++) {
    l = i + 1, r = n;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (sum1[mid] - sum1[i] + sum1[i - 1] == x / 2) {
        cout << "YES";
        return 0;
      } else if (sum1[mid] - sum1[i] + sum1[i - 1] > x / 2)
        r = mid - 1;
      else
        l = mid + 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    l = i + 1, r = n;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (sum2[mid] - sum2[i] + sum2[i - 1] == x / 2) {
        cout << "YES";
        return 0;
      } else if (sum2[mid] - sum2[i] + sum2[i - 1] > x / 2)
        r = mid - 1;
      else
        l = mid + 1;
    }
  }
  cout << "NO";
  return 0;
}
