#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  ll total = 0;
  for (int i = 0; i < n; i++) total += a[i];
  if (total == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  bool ok = true;
  for (auto m : mp) {
    if (n / 3 != m.second) ok = false;
  }
  cout << (ok ? "Yes" : "No") << endl;
  return 0;
}
