#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 9, N4 = N * 4, p = 1000000007;
void scan(int &x) {
  int ty = 1;
  x = 0;
  char ch = getchar();
  while (!(ch >= '0' && ch <= '9') && ch != '-') ch = getchar();
  if (ch == '-') {
    ty = -1;
    ch = getchar();
  }
  while ((ch >= '0' && ch <= '9')) {
    x *= 10;
    x += (ch - '0');
    ch = getchar();
  }
  x *= ty;
}
int n, m, k, f[N];
void putNode(int u, int d, int kk) {
  int len = k - kk;
  for (int i = 1; i <= len; i++) {
    m++;
    f[m] = u;
    if (m == n) return;
    if (d > 1) putNode(m, d - 1, 1);
  }
}
int main() {
  int d;
  scan(n);
  scan(d);
  scan(k);
  if (n < d)
    printf("NO");
  else {
    if (k == 0) {
      if (n == 1 && d == 0)
        printf("YES");
      else
        printf("NO");
    } else if (k == 1) {
      if ((n == 1 && d == 0) || (n == 2 && d == 1))
        printf("YES");
      else
        printf("NO");
    } else if (k == 2) {
      if (n - k == 1)
        printf("YES");
      else
        printf("NO");
    } else {
      if (d == 0) {
        if (n == 1)
          printf("YES");
        else
          printf("NO");
      } else if (d == 1) {
        if (n == 2)
          printf("YES\n1 2\n");
        else
          printf("NO");
      } else {
        if (n >= d) {
          for (int i = 1; i <= d; i++) f[i + 1] = i;
          m = d + 1;
          for (int i = 2; i <= d; i++) {
            if (m < n) putNode(i, min(i - 1, d + 1 - i), 2);
          }
          if (m == n) {
            printf("YES\n");
            for (int i = 2; i <= n; i++) printf("%d %d\n", i, f[i]);
          } else {
            printf("NO\n");
          }
        } else
          printf("NO");
      }
    }
  }
  return 0;
}
