#include <bits/stdc++.h>
using namespace std;
long long int mpow(long long int a, long long int b) {
  if (b == 0) {
    return 1;
  } else if (b % 2 == 0) {
    long long int memo = mpow(a, b / 2);
    return memo * memo % (long long int)(1e9 + 7);
  } else {
    return mpow(a, b - 1) * a % (long long int)(1e9 + 7);
  }
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int main(void) {
  int n;
  cin >> n;
  long long int a;
  vector<long long int> A;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a;
    A.push_back(a);
  }
  sort(A.begin(), A.end());
  if (A[A.size() - 1] == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (A.size() % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  long long int memo1, memo2, memo3;
  memo1 = A[0];
  memo2 = A[n / 3];
  memo3 = A[n / 3 * 2];
  for (int i = 0; i < (int)(n / 3); i++) {
    if (memo1 != A[i]) {
      cout << "No" << endl;
      return 0;
    }
    if (memo2 != A[i + n / 3]) {
      cout << "No" << endl;
      return 0;
    }
    if (memo3 != A[i + n / 3 * 2]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
