#include <bits/stdc++.h>
using namespace std;
long long inf = std::numeric_limits<long long>().max();
int main() {
  long long n, k, d;
  cin >> n >> k >> d;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  string ans = "Yes";
  vector<int> w, u;
  if (v[k - 1] - v[0] > d) ans = "No";
  w.push_back(0);
  int ant = 0;
  for (int i = k; i < n; i++) {
    if (v[i] - v[ant] > d) {
      w.push_back(i);
      ant = i;
    }
  }
  for (int i = 1; i < w.size(); i++) {
    int j = w[i];
    while (abs(v[j] - v[w[i]]) <= d) j--;
    u.push_back(j);
  }
  u.push_back(v.size() - 1);
  int ub = k;
  for (int i = 1; i < w.size(); i++) {
    int l = u[i] - k + 1;
    if (l < ub) {
      l = ub;
      u[i] = l + k - 1;
    }
    int a, b;
    a = l;
    b = u[i];
    int limite;
    if (i == w.size() - 1)
      limite = v.size();
    else
      limite = w[i + 1];
    while (v[b] - v[a] > d and b < limite) {
      a++;
      b++;
    }
    if (v[b] - v[a] > d or b - a + 1 < k or b >= limite)
      ans = "No";
    else
      ub = b + 1;
  }
  cout << ans << endl;
}
