#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (N); i++) cin >> A[i];
  long long tmp = 0;
  for (int i = 0; i < (N); i++) tmp += A[i];
  if (tmp == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (N % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  sort(A.begin(), A.end());
  long long x = A[0], y = A[N / 3], z = A[N * 2 / 3];
  if (x + y != z) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < (N / 3); i++) {
    if (A[i] != x || A[i + N / 3] != y || A[i + N * 2 / 3] != z) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
