Consider an undirected tree. A subset of nodes of this tree is called good if there exists a node $$$r$$$ such that if the tree is rooted at $$$r$$$, no node in the subset is an ancestor of another node in the subset.
You are given a connected undirected graph of $$$N$$$ nodes numbered from $$$1$$$ to $$$N$$$ and $$$M$$$ edges numbered from $$$1$$$ to $$$M$$$. Each edge $$$j$$$ connects the nodes $$$U_j$$$ and $$$V_j$$$. The graph has no self-loops or duplicate edges. A subset of nodes of this graph is called ideal if there is some spanning tree of the graph for which this subset of nodes is good.
You are given a subset of nodes of this graph which has size at least 2. Find whether or not it is ideal. If it is ideal, find a valid spanning tree and root as specified above.
The first line contains two integers, $$$N$$$ and $$$M$$$, respectively the number of nodes and number of edges.
The next $$$M$$$ lines describe the edges. The $$$j$$$-th line contains two numbers $$$U_j$$$ and $$$V_j$$$, the endpoints of the $$$j$$$-th edge.
The next line contains a single integer $$$S$$$, the size of the given subset of nodes.
The next line contains $$$S$$$ integers, $$$T_1, ... T_S$$$, the given subset of nodes.
Constraints
If the given subset is not ideal, you should print a single line which is NO.
If the given subset is ideal, on the first line, you should print YES.
On the second line, you should print your chosen root.
Then, on the next $$$N-1$$$ lines you should describe your chosen spanning tree. Each line should contain the two endpoints of a single chosen edge. The two endpoints may be in any order. The edges themselves may be in any order.
6 71 22 31 45 65 16 34 334 2 5
YES 1 1 2 1 4 1 5 2 3 5 6
6 71 22 31 45 65 16 34 333 6 5
NO
Samples
In Sample 1, the given subset is ideal. If the spanning tree in the sample output is chosen and rooted at 1, no node in the subset is an ancestor of another node in the subset.
In Sample 2, the given subset is not ideal. It is impossible to choose a valid spanning tree and root.
| Name |
|---|


