Trees

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

Vasya has gone deep into the graph theory. He's read a chapter about trees, and a problem has been bothering him: he must build a rooted tree with NN nodes, with each node, except the leaf nodes, having strictly KK children. The answer must be written as a list of edges; of all possible variants, he must find the lexicographically minimal one.

The list of edges is written into a string in the following manner. Each edge is described by a pair of integers --- the numbers of nodes, which the edge connects. These two numbers must be written without leading zeroes, and there must be strictly one space character between them. The string consists of the descriptions of all N1N-1 edges of the graph, written consecutively and separated by a single space character. It is assumed that all nodes are numbered from 11 to NN, the root being number 11.

Vasya must find a lexicographically minimal string, which can be obtained in this manner for a rooted tree of the required kind. In lexicographical comparison assume that the space as a character is smaller than all digits.

For instance, let's build a tree with 55 nodes, with all non-leaf nodes having 22 children. A tree with edges (1,4),(1,5),(4,3),(4,2)(1, 4), (1, 5), (4, 3), (4, 2) fits the requirement. The list of its edges can be written in a string in different ways:

  • 4 2 4 3 1 4 1 5
  • 2 4 3 4 1 4 1 5
  • 1 4 1 5 2 4 3 4

Here, each variant is smaller than the preceding one, but none are optimal. With these values of NN and KK the lexicographically minimal string 1 2 1 3 2 4 2 5 is produced by a different tree.

Help Vasya solve this task, he's got a test on graph theory coming up!

입력

The first line of the input file contains two integers NN and KK, where NN --- is the number of nodes in the required tree, KK --- is the number of children of non-leaf nodes (2N1052 \le N \le 10^5, 1K1051 \le K \le 10^5).

출력

If the tree with the specified parameters does not exist, print the word No into the only line of the output file.

Otherwise, in the first line of the output file, print the word Yes; in the second line, print the required lexicographically minimal string.