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