Color

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

문제

Big Horse is the God of Mathematics. He has drawn a complete undirected graph with nn vertices. Each edge has one of the mm colors, numbered 1,,m1, \ldots, m. Big Horse has a big ambition to extend this graph to a maximal possible complete graph, such that any two edges with the same endpoint have different colors. He finds out that obviously, the graph has at most m+1m + 1 vertices. So he asks you if he can extend his graph to m+1m + 1 vertices.

입력

In the first line there are two integers nn and mm (1n2001 \le n \le 200, 1m2001 \le m \le 200, and nm+1n \le m + 1).

Then there are n1n - 1 lines. In the ii-th line, there are nin - i numbers. The jj-th number in the ii-th line indicates the color of the edge connecting vertex ii and i+ji + j. All colors are integers from 11 to mm.

출력

In the first line, output "Yes" (without quotes) if you can extend the graph, or "No" otherwise.

If the first line is "Yes", output mm extra lines. In the ii-th of these lines, print m+1im + 1 - i numbers. The jj-th number in the ii-th line indicates the color of the edge connecting vertices ii and i+ji + j. The edges which were given in the input must be colored as in the input. Any two edges with the same endpoint must have different colors. If there are several possible answers, print any one of them.