#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int *mn, *mx;
  mn = min_element(a, a + n);
  mx = max_element(a, a + n);
  int dif = (mx - mn + 1);
  int c[dif];
  memset(c, 0, sizeof(c));
  int f = 0;
  for (int i = 0; i < n; i++) {
    if (c[a[i] - (*mn)] == 0)
      c[a[i] - (*mn)] += 1;
    else {
      f = 1;
      break;
    }
  }
  if (f == 1)
    cout << "No";
  else {
    for (int i = 0; i < dif; i++) {
      if (c[i] != 1) {
        f = 1;
        break;
      }
    }
    if (f == 1)
      cout << "No";
    else
      cout << "Yes";
  }
  return 0;
}
