Misha trains several ACM teams at the university. He is an experienced coach, and he does not underestimate the meaning of friendly and collaborative atmosphere during training sessions. It used to be that way, but one of the teams happened to win contests a little bit more often than others, and hence became slightly too big for their boots. That does not contribute to positive spirit which is essential for successful training. But Misha knows what to do!
Representatives of k teams participate in Misha’s training sessions, each team has three members. Alas, teams rarely attend en masse, but at least one member per team is always present, of course. During the next training session Misha is going to split everyone into n pairs, so that each pair will include representatives of different teams. Players will play a minicontest against each other in each pair.
A situation when no two minicontests are won by representatives of one team is the one that suits Misha’s goals best. He may be somewhat cunning when selecting winner in each pair in order to achieve such situation. Find out whether Misha will succeed.
Input
The first line contains two numbers — n and k (1 ≤ n ≤ 10^{5}, 2 ≤ k ≤ 10^{5}).
n lines follow. ith of these contains two numbers x_{i}, y_{i} (1 ≤ x_{i}, y_{i} ≤ k; x_{i} ≠ y_{i}) — the numbers of teams, whose representatives are in pair number i.
It is guaranteed that each team is represented in no less than one and no more than three pairs.
Output
If Misha is to succeed, output Yes in the first line. In each of the following n lines output one number — the number of team that is to win in the corresponding pair. If there are several answers, output any.
If Misha is to fail, output No in the only line.
Samples
input  output 

3 4
1 2
2 3
1 4
 Yes
2
3
4

6 4
1 2
1 3
1 4
2 3
2 4
3 4
 No

Problem Author: Alexander Ipatov, prepared by Egor Shchelkonogov