#include <bits/stdc++.h>
using namespace std;
string s;
bool reach(int start, int goal) {
  int pos = start;
  while (pos < goal) {
    if (pos + 2 == goal || pos + 1 == goal) return true;
    if (s[pos + 2] == '.')
      pos += 2;
    else if (s[pos + 1] == '.')
      pos++;
    else
      return false;
  }
}
int num[100005];
int main(void) {
  int n;
  cin >> n;
  for (int i = 0; i < 100005; i++) num[i] = 0;
  for (int i = 0; i < n; i++) {
    long long int a;
    cin >> a;
    num[a]++;
  }
  bool flag = true;
  if (n % 3 != 0) flag = false;
  for (int i = 0; i < 100005; i++) {
    if (num[i] % (n / 3) != 0) flag = false;
  }
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
