#include <bits/stdc++.h>
using namespace std;
int kx, n, dx;
int seq[500010] = {0}, dp[520010] = {0};
int fwt[500010] = {0};
inline void readx(int& x) {
  x = 0;
  int k = 1;
  register char ch = 0;
  while (ch < '0' || ch > '9') {
    ch = getchar();
    if (ch == '-') k = -1;
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= k;
}
inline void updatex(int pos, int val) {
  while (pos <= n) {
    fwt[pos] += val;
    pos += (pos & (-pos));
  }
}
inline int queryx(int pos) {
  int ret = 0;
  while (pos) {
    ret += fwt[pos];
    pos -= (pos & (-pos));
  }
  return ret;
}
int main() {
  readx(n);
  readx(kx);
  readx(dx);
  for (int i = 1; i <= n; i++) readx(seq[i]);
  sort(seq + 1, seq + n + 1);
  if (seq[kx] - seq[1] > dx) {
    printf("No\n");
    return 0;
  }
  for (int i = kx; i <= min(kx * 2, n); i++)
    if (seq[i] - seq[1] <= dx) {
      dp[i] = 1;
      updatex(i, dp[i]);
    }
  int lx = kx + 1, rx;
  for (int i = 2 * kx; i <= n; i++) {
    rx = i - kx + 1;
    while (seq[i] - seq[lx] > dx) lx++;
    if (lx > rx) continue;
    if (queryx(rx - 1) - queryx(max(0, lx - 2))) {
      dp[i] = 1;
      updatex(i, dp[i]);
    }
  }
  if (dp[n])
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
