#include <bits/stdc++.h>
using namespace std;
using PII = pair<int, int>;
using LL = long long;
map<int, int> mp;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (mp.find(x) != mp.end())
      mp[x]++;
    else
      mp[x] = 1;
  }
  int siz = mp.size();
  if (mp.find(0) != mp.end()) siz--;
  if (siz != 3)
    cout << "No\n";
  else {
    vector<int> v;
    int zero = 0;
    if (mp.find(0) != mp.end()) zero = mp[0];
    for (auto p : mp) {
      if (p.first != 0) v.push_back(p.second);
    }
    sort(v.begin(), v.end());
    if (v[1] - v[0] + v[2] - v[0] > zero)
      cout << "No\n";
    else
      cout << "Yes\n";
  }
  return 0;
}
