401677: GYM100513 B Colored Blankets
Description
Recently Polycarp has opened a blankets store and he faced with many challenges.
He has got k blankets. A blanket has two sides, each of k blankets has at most one colored side. So either both sides are uncolored or one side is colored and the other one is not. If a side is colored, one of n possible colors is used. It is known that k is divisible by n.
Polycarp wants to color all uncolored sides in such a way that:
- each blanket will have both sides colored (one color per side), the colors can be the same or different, all the used colors are from n possible colors;
- it will be possible to compose n kits with blankets in each kit that blankets in each kit are identically colored.
It is allowed to turn over blankets to determine that they are identically colored: for example, red-blue and blue-red blankets are identically colored. Blankets in different kits can be identically colored.
InputThe first line contains two integer numbers k and n (1 ≤ n ≤ k ≤ 1000) — number of blankets and colors. It is guaranteed that k is divisible by n. The second line contains a sequence of integers c1, c2, ..., ck (1 ≤ ci ≤ n or ci = - 1), where ci stands for the color of the colored side of the i-th blanket or - 1 if it is uncolored.
OutputIf there is no solution for the problem, print "No" in the first line. Otherwise print a line containing "Yes" and k lines describing each blanket. The i-th line should contain a pair of colors (integers in the range 1, 2, ..., n) used for the i-th blanket. You may print colors in pairs in any order.
If there are multiple solutions, print any of them.
ExamplesInput6 2Output
1 1 2 2 -1 2
YesInput
1 2
2 1
2 2
2 2
2 1
2 2
8 4Output
4 -1 1 -1 4 3 -1 -1
Yes
4 1
2 1
2 1
3 1
1 4
3 1
4 1
4 1