#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
long long int expo(long long int x, long long int y) {
  long long int res = 1;
  x = x % mod;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
void matmul(long long int a[][2], long long int b[][2]) {
  long long int tmp[2][2];
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 2; j++) {
      tmp[i][j] = 0;
      for (int k = 0; k < 2; k++)
        tmp[i][j] = (tmp[i][j] + a[i][k] * b[k][j]) % mod;
    }
  }
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++) a[i][j] = tmp[i][j];
}
long long int fibo(int n) {
  if (n == 0)
    return 0;
  else if (n == 1)
    return 1;
  long long int T[2][2] = {{0, 1}, {1, 1}};
  long long int res[2][2] = {{1, 0}, {0, 1}};
  n--;
  while (n) {
    if (n & 1) matmul(res, T);
    n >>= 1;
    matmul(T, T);
  }
  return res[1][1];
}
const int nn = 5e5 + 10;
int bit[nn];
int n;
void update(int ind, int val) {
  for (int i = ind; i <= n; i += (i & -i)) bit[i] += val;
}
int getsum(int ind) {
  if (ind == 0) return 1;
  int sum = 0;
  for (int i = ind; i > 0; i -= (i & -i)) sum += bit[i];
  return sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int k, d;
  cin >> n >> k >> d;
  int a[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  int dp[n + 1];
  fill(dp, dp + n + 1, 0);
  dp[0] = 1;
  update(1, 1);
  int l = 1, cl = 1;
  for (int r = 1; r <= n; r++) {
    for (; l < r; l++) {
      if (a[r] - a[l] <= d) break;
    }
    if (r - l + 1 >= k) {
      if (getsum(r - k) - getsum(l - 2) >= 1) {
        dp[r] = 1;
        update(r, 1);
      }
    }
  }
  dp[n] == 1 ? cout << "Yes" : cout << "No";
  return 0;
}
