ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1945. Many-armed Brothers

Time limit: 1.0 second
Memory limit: 64 MB
Mosquitoes which were brought to Uranus from the Earth, have mutated and spawned in great amounts. Now Uranians sapiens have to slap themselves constantly to kill insects that keep trying to suck bioplasm out of them. This may be the reason why newly gemmated Uranians may have more arms than their parents. The first offspring of every Uranian has as many arms as his parent has. The second offspring has twice as many, the third one has three times as many and so on. None of Uranians can gemmate more than g children in his life.
Now let's turn to cinema. The first night of the 146th episode of the Star Wars will take place in g movie halls, and n Uranians are already queuing for tickets. Cashier Fedya is afraid of brothers starting to sort things out during the film. That’s why he wants to sell tickets in such a way that there are no brothers in the same hall. Of course he knows nothing about their family relationships, but he can see perfectly well how many arms each Uranian has. Will this information be enough for Fedya to distribute them into the halls so that there are no Uranians with a common father in any single hall?

Input

The first line contains integers n and g (1 ≤ n ≤ 50 000; 2 ≤ g ≤ 5). Further there are n different integers, which specify the number of arms of every Uranian in the queue. Every Uranian has at least one and at most 109 arms.

Output

If Fedya is able to distribute the Uranians into cinema halls as required, output “Yes” in the first line, and then output n numbers, showing the number of the hall for every visitor. The visitors should be described in the order in which they are given in the input. The halls are numerated with numbers from 1 to g. If the problem has many solutions you may output any of them. If there is no solution, output “No”.

Sample

inputoutput
5 2
1
2
3
4
6
Yes
1
2
1
1
2
Problem Author: Andrey Demidov
Problem Source: Open Ural FU Personal Contest 2012