To prepare for the second round of the regional informatics olympiad, all computers need to be connected into a single network. Currently, there are separate connections between some computers, forming distinct local networks.
All computers are considered part of a single network if there is a path connecting any pair of computers.
The input provides the costs of connecting the -th computer to the -th computer (costs can be integers or decimals). It also lists which computers are already connected.
Your task is to determine the minimum cost required to connect all computers into one network. If it's impossible, output "No".
The first line contains numbers: - the number of computers (2 \le N \le 1000), - the number of pairs of computers for which connection costs are known (2 \le M \le N \cdot (N-1)/2), and - the number of existing connections between computers (2 \le K \le N \cdot (N-1)/2).
The next lines each contain numbers: the indices of computers that can be connected and the cost of this connection. Following that, there are lines, each with numbers indicating computers that are already connected.
Output the minimum cost in hryvnias, formatted to decimal places as XXX.XX UAH (without leading zeros and with exactly digits after the decimal point). If the cost is , output UAH. If it's impossible to connect all computers, output "No".
Example 1