Graph Theory
Serge is studying graph theory. Recently he has learned about graph radius and diameter. Consider undirected unweighed connected graph G, let us denote the length of the shortest path between vertices s and t as ρ(s, t). Radius r(G) of the graph is . Diameter d(G) of the graph is . Intuitively, diameter of the graph is the largest distance that you need to go to get from one vertex to another, and radius is the largest distance you can be forced to go if you choose where you would go from.
The professor on the lecture proved that d(G)/2 ≤ r(G) ≤ d(G) for any graph G. Now Serge wonders whether for any values d and r such that d/2 ≤ r ≤ d there exists graph G such that d(G) = d and r(G) = r. Help him to find that out.
Input
The input file contains two integer numbers d and r (d/2 ≤ r ≤ d ≤ 50, 1 ≤ r).
Output
If there exists a graph with the given diameter and radius, output "YES" at the first line of the output file. The second line must contain two integer numbers: n (2 ≤ n ≤ 400) and m - the number of vertices and the number of edges. The following m lines must contain two integer numbers each - the vertices connected by the corresponding edge. There must be no loops and no parallel edges.
If there is no such graph, output "NO" at the first line of the output file.