#include <bits/stdc++.h>
using namespace std;
int n, d, k, Sol;
set<pair<int, int>> ans;
void DFS(int u, int par, int d, int sizee) {
  if (u > n) return;
  ans.insert({min(u, par), max(u, par)});
  if (d)
    for (int i = 0; i < sizee && Sol < n; ++i) DFS(++Sol, u, d - 1, k - 1);
}
int main() {
  cin >> n >> d >> k;
  if (n <= d || d > 1 && k < 2) {
    cout << "No";
    return 0;
  }
  for (Sol = 1; Sol <= d; ++Sol) ans.insert({Sol, Sol + 1});
  for (int i = 2; i <= d && Sol < n; ++i)
    DFS(i, i - 1, min(i - 1, d - i + 1), k - 2);
  if (Sol < n) {
    cout << "No";
    return 0;
  } else {
    cout << "Yes" << endl;
    for (auto& i : ans) cout << i.first << " " << i.second << endl;
  }
  return 0;
}
