#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  long long N;
  cin >> N;
  vector<long long> a(N);
  for (long long i = 0; i < N; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  if (N % 3 == 0) {
    if (a[0] == 0 && a[N / 3 - 1] == 0 && a[N / 3] == a[N - 1]) {
      cout << "Yes" << endl;
      return 0;
    } else if (a[0] == a[N / 3 - 1] && a[N / 3] == a[2 * N / 3 - 1] &&
               a[2 * N / 3] == a[N - 1]) {
      cout << "Yes" << endl;
      return 0;
    } else {
      cout << "No" << endl;
      return 0;
    }
  } else {
    if (a[0] == 0 && a[N - 1] == 0) {
      cout << "Yes" << endl;
      return 0;
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  return 0;
}
