using System;

public class Exc
{
    static void Main(string[] args)
    {
        var N=int.Parse(Console.ReadLine());
        int[]num=new int[N];
        
        var max=0;
        string[]array=Console.ReadLine().Split(' ');
        for(var i=0;i<N;i++){
            num[i]=int.Parse(array[i]);
            if(num[i]>max)max=num[i];
        }
        
        var x=1;
        var count=-1;
        while(max>x){
            count=count+1;
            x=x*2;
        }
        
        double y=Math.Pow(2,count);
        
        var sum=0;
        foreach(int a in num){
            sum+=a;
        }
        
        sum=sum-max;
        
        var count1=0;
        for(var i=0;i<N;i++){
            if(y>num[i]&&num[i]!=max){
                count1=count1+1;
            }
        }
        
        if(N%2==0){
            Console.WriteLine("No");
        }else if((sum/((N-1)/2)==max)&&(count1<=(N-1)/2)&&max==y*2-1){
                Console.WriteLine("Yes");
            
        }else{
                Console.WriteLine("No");
        }
    }
}