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

#define int long long

void solve()
{
  int n;
  cin>>n;

  set <int> s1;

  int mi,ma;

  for(int i=0;i<n;i++)
  {
    int x;
    cin>>x;

    s1.insert(x);

    if(i==0)
    {
      mi=x;
      ma=x;
    }

    mi=min(mi,x);
    ma=max(ma,x);
  }

  if(s1.size()==n && mi==1 && ma==n)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
}

int32_t main()
{
  // freopen("input1.txt","r",stdin);
  // freopen("output1.txt","w",stdout);

  int t;
  t=1;

  while(t--)
    solve();

return 0;
}
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
  vector<int>A(3);
  for(auto&&x:A)cin>>x;
  sort(A.begin(),A.end());
  if(A[2]-A[1]==A[1]-A[0])cout <<"Yes"<<endl;
  else cout <<"No"<<endl;
  
  return 0;
}