#include <bits/stdc++.h>
using namespace std;
bool f1(vector<int> a) {
  for (int i = 0; i < (int)(a.size()); i++) {
    if (a[i] > 0) return false;
  }
  return true;
}
bool f2(vector<int> a) {
  int n = a.size();
  if (n % 3) return false;
  for (int i = n / 3; i < (int)(n); i++) {
    if (a[n / 3] != a[i]) return false;
  }
  return a[0] == 0;
}
bool f3(vector<int> a) {
  int n = a.size();
  if (n % 3) return false;
  for (int i = 0; i < (int)(n / 3); i++) {
    if (a[0] != a[i]) return false;
  }
  for (int i = n / 3; i < (int)(n / 3 * 2); i++) {
    if (a[n / 3] != a[i]) return false;
  }
  for (int i = n / 3 * 2; i < (int)(n); i++) {
    if (a[n / 3 * 2] != a[i]) return false;
  }
  return a[0] != a[n / 3] && a[n / 3] != a[n / 3 * 2] && a[0] != a[n / 3 * 2];
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  sort((a).begin(), (a).end());
  cout << ((f1(a) || f2(a) || f3(a)) ? "Yes" : "No") << endl;
}
