#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<long long, long long> mp;
  int cnt = 0;
  vector<long long> u;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    if (mp.find(a) != mp.end()) {
      mp[a]++;
    } else {
      cnt++;
      mp[a] = 1;
      u.push_back(a);
    }
  }
  if (n % 3 != 0) {
    if (u[0] == 0 & cnt == 1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
  if (cnt > 3) {
    cout << "No" << endl;
    return 0;
  }
  if (cnt == 1) {
    if (u[0] == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
  if (cnt == 2) {
    int id = 0;
    if (mp[u[0]] < mp[u[1]]) id = 1;
    if (u[(id + 1) % 2] == 0 && mp[u[id]] == mp[u[(id + 1) % 2]] * 2)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  } else if (cnt == 3) {
    if (mp[u[0]] == mp[u[1]] && mp[u[1]] == mp[u[2]])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }
}
