There are N cats. We number them from 1 through N.

Each of the cats wears a hat. Cat i says: "there are exactly a_i different colors among the N - 1 hats worn by the cats except me."

Determine whether there exists a sequence of colors of the hats that is consistent with the remarks of the cats.

Constraints

* 2 ≤ N ≤ 10^5
* 1 ≤ a_i ≤ N-1

Input

Input is given from Standard Input in the following format:


N
a_1 a_2 ... a_N


Output

Print `Yes` if there exists a sequence of colors of the hats that is consistent with the remarks of the cats; print `No` otherwise.

Examples

Input

3
1 2 2


Output

Yes


Input

3
1 1 2


Output

No


Input

5
4 3 4 3 4


Output

No


Input

3
2 2 2


Output

Yes


Input

4
2 2 2 2


Output

Yes


Input

5
3 3 3 3 3


Output

No
import java.util.*;
import java.io.*;

public class Main {
	public static int max(int[] array){
		int L = array.length;
		int m = array[0];
		for(int i=1;i<L;i++){
			if(array[i]>m) m=array[i];
		}
		return m;
	}
	public static int min(int[] array){
		int L = array.length;
		int m = array[0];
		for(int i=1;i<L;i++){
			if(array[i]<m) m=array[i];
		}
		return m;
	}
	public static int count(int[] array, int target){
		int c = 0;
		int L = array.length;
		for(int i=0;i<L;i++){
			if(array[i]==target)c++;
		}
		return c;
	}
	
	public static boolean solve(int[] hat){
		int M = max(hat);
		int m= min(hat);
		if(M-m>=2) return false;
		
		if(m==M){
			return (m==1 || hat.length==hat[0]+1 || hat.length/2>=m);
		}
		
		//if M==m+1
		//there are M colors
		//the cats who say "I see only m colors" are alone, and the others are not
		int possibleMin = count(hat,m);
		if(count(hat,M)>0)possibleMin++;
		
		int possibleMax = count(hat,m)+count(hat,M)/2;
		

		return (possibleMin<=M && possibleMax>=M);
	}
	
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] hat = new int[N];
        for(int n=0;n<N;n++)hat[n]=sc.nextInt();
        
        if(solve(hat))System.out.println("Yes");
        else System.out.println("No");
    }
}