#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int ar[100000];
  for (int i = 0; i < N; i++) cin >> ar[i];
  sort(ar, ar + N);
  if (ar[N - 1] == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (N % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  if ((ar[N / 3 - 1] == 0 && ar[N / 3] == ar[N - 1]) ||
      (ar[N / 3 - 1] == ar[0] && ar[N / 3 * 2 - 1] == ar[N / 3] &&
       ar[N - 1] == ar[N / 3 * 2])) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
  return 0;
}
