{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eAfter the last network breakdown, you\u0027ve been assigned to redesign the signal transmission network of ICPC (Internet Clogging Prevention Corporation)! \u003c/p\u003e\u003cp\u003eThere are $$$n$$$ signal stations in total, they are all newly built and can establish bidirectional signal connections with at most $$$d$$$ other stations. ICPC demands you to reach the full potential of the network with these fancy stations. That is, all stations should have exactly $$$d$$$ connections, no connection with oneself, and no multiple connections between the same pair of stations.\u003c/p\u003e\u003cp\u003eThese stations will later be assigned to $$$c$$$ departments of ICPC. Each department wants at least one station, and all stations will be assigned to these departments. To prevent another network breakdown, all stations assigned to the same department should be able to communicate with each other, while stations assigned to different departments should not be able to do so. Two stations can communicate with each other when there is a sequence of stations that begins and ends at these two stations, and every adjacent station in the sequence has a direct signal connection.\u003c/p\u003e\u003cp\u003eAssigning stations to departments is not your job; However, since you are probably the only responsible person left in ICPC, you want to make sure it is at least possible. Give a network proposal that satisfies all the restrictions above, or determine it is impossible.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe only line of the input contains three integers $$$n,d$$$ and $$$c$$$ ($$$1 \\leq c \\leq n \\leq 100\\,000$$$, $$$0 \\leq d \u0026lt; n$$$, $$$n\\times d \\leq 200\\,000$$$), denoting the number of signal stations, the number of connections each station can establish, and the number of departments.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIf it is impossible to connect the stations in such a way, print a single line containing \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNo\u003c/span\u003e\". Otherwise, print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYes\u003c/span\u003e\" in the first line, then print $$$n$$$ lines, with the $$$i$$$-th line containing $$$d$$$ numbers, denoting the $$$d$$$ stations that have connections with the $$$i$$$-th station. \u003cspan class\u003d\"tex-font-style-bf\"\u003eThe $$$d$$$ numbers should be sorted in ascending order.\u003c/span\u003e\u003c/p\u003e\u003cp\u003eThe label of all stations should be integers in the range $$$[1,n]$$$. If there is more than one solution, any one of them will be accepted.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e12 3 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYes\n2 5 8\n1 3 6\n2 4 7\n3 5 8\n1 4 6\n2 5 7\n3 6 8\n1 4 7\n10 11 12\n9 11 12\n9 10 12\n9 10 11\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 2 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNo\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}