#include "bits/stdc++.h"
using namespace std;

int main() {
	int N, a[100000];
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> a[i];
	}
	sort(a, a + N);
	if (a[0] == a[N - 1]) {
		if (a[0] == N - 1 || a[0] * 2 <= N) cout << "Yes";
		else cout << "No";
	}
	else if (a[N - 1] - a[0] == 1) {
		int X = 0, Y = 0;
		for (int i = 0; i < N; i++) {
			if (a[i] == a[0]) X++;
			else Y++;
		}
		if (X < a[N - 1] && 2 * (a[N - 1] - X) <= Y) cout << "Yes";
		else cout << "No";
	}
	else cout << "No";
}