Problem: Ada operates a network that consists of servers and direct connections between them. Each direct connection between a pair of distinct servers allows bidirectional transmission of information between these two servers. Ada knows that these direct connections allow to directly or indirectly transmit information between any two servers in this network. We say that server is a neighbor of server if there exists a direct connection between these two servers.
Ada needs to configure her network's WRP (Weird Routing Protocol). For each server she needs to select exactly one of its neighbors as an auxiliary server . After all are set, routing works as follows. Suppose server wants to find a path to server (different from ).
- Server checks all of its direct connections to other servers. If it sees a direct connection with server , it knows the path and the process terminates.
- If the path was not found at the first step, server asks its auxiliary server to find the path.
- Auxiliary server follows this process starting from the first step.
- After finds the path, it returns it to . Then server constructs the resulting path as the direct connection between and plus the path from to .
As you can see, this procedure either produces a correct path and finishes or keeps running forever. Thus, it is critically important for Ada to configure her network's WRP properly.
Your goal is to assign an auxiliary server for each server in the given network. Your assignment should make it possible to construct a path from any server to any other server using the aforementioned procedure. Or you should report that such an assignment doesn't exist.
Input Format: The first line of the input contains two integers and (, ) — the number of servers and the number of direct connections in the given network.
Then follow lines containing two integers and (, ) each, the -th line describes the -th direct connection.
It is guaranteed that there is no more than one direct connection between any two servers. It is guaranteed that there is a direct or indirect route (consisting only of the given direct connections) between any two servers.
Output Format: If there is no way to assign an auxiliary server for each server in such a way that WRP will be able to find a path from any server to any other server , print "No" in the only line of the output.
Otherwise, print "Yes" in the first line of the output. In the second line of the output print integers, the -th of these integers should be equal to – the index of the auxiliary server for server . Do not forget that there must be a direct connection between server and server .
You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.