#include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4996)
const int maxn = 100005;
int a[maxn];
map<int, int> Map;
vector<int> E;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (++Map[a[i]] == 1) {
      E.push_back(a[i]);
    }
  }
  if (E.size() > 3) {
    printf("No\n");
    return 0;
  }
  sort(E.begin(), E.end());
  if (E.size() == 1 && E[0] == 0) {
    printf("Yes\n");
    return 0;
  }
  if (n % 3)
    printf("No\n");
  else if (E.size() == 2 && E[0] == 0 && Map[E[1]] == 2 * Map[E[0]])
    printf("Yes\n");
  else if (E.size() == 3 && Map[E[0]] == Map[E[1]] && Map[E[1]] == Map[E[2]])
    printf("Yes\n");
  else
    printf("No\n");
}
