function myout(text){console.log(text);}//standard output
function Main(input) {
	input = input.trim();
	//input = input.trim().split(" ");
	input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var len = parseInt(input[0]) - 1;
  var b = input[1].split(" ").map((a)=>Number(a));
  var list = {};
  for(var i = 0; i < b.length; i++){
    if(list[b[i]] == null){
       list[b[i]] = 1;
       }else{
        list[b[i]]++; 
       }
  }
  var max = Math.max.apply(null,b);
  var noTyohuku = b.filter(function (x, i, self) {
            return self.indexOf(x) === i;
  }).sort(function(a,b){
  	return b - a;
  });
  for(var i = 0; i < noTyohuku.length; i++){
    if(i == 0 && list[max] != 1){
       myout("No");
      return;
    }else if(i != 0 && list[noTyohuku[i]] > len - i){
      myout("No");
      return;
    }
  }
  myout("Yes");
      return;
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
