#include <bits/stdc++.h>
using namespace std;
vector<pair<string, pair<int, int> > > vec;
int main() {
  long long N;
  cin >> N;
  vector<long long> a(N), b(3);
  map<long long, long long> m;
  long long k = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (m[a[i]] == 0) {
      if (k == 0) b[0] = a[i];
      if (k == 1) b[1] = a[i];
      if (k == 2) b[2] = a[i];
      k++;
    }
    m[a[i]]++;
  }
  cout << "Yes" << endl;
}
