#include<bits/stdc++s.h>
using namespace std;

int main(){
    int n,b[1000000010]; cin>>n;
    long long a[n];
    
    if(n!=3 && n%2==1){
        cout<<"No"<<endl;
        return 0;
    }
    
    for(int i=0;i<n;i++){
        cin>>a[i];
        b[a[i]]++;
    }
    
    int count=0;
    for(auto c:b){
        count++;
    }
    if(count!=3){
        cout<<"No"<<endl;
        return 0;
    }
    
    cout<<"Yes"<<endl;
}