The mayor of Bitberg has decided to establish electrical connections between some houses in the city. Each connection involves installing a cable with a specific resistance between two houses. These cables are bidirectional, allowing current to flow in both directions between the connected houses. It is guaranteed that the network of cables forms a connected graph, ensuring that there is at least one path between any pair of houses. After the installation, Mr. 01101 (the mayor of Bitberg) was approached by the fire department to verify that the resistance between certain pairs of houses does not exceed the specified resistance limits. Your task is to assist the firefighters by quickly determining whether the resistance between several pairs of houses is within the acceptable range.
The houses are numbered from to (N \leq 100). The connections are described by pairs , where M \leq 10000. Additionally, you are provided with a matrix of size N \times N, which specifies the maximum allowable resistance between any two houses, and a matrix that specifies the minimum allowable resistance. The diagonal elements A_{ii} and B_{ii} are always , indicating no restrictions on the resistance between a house and itself. Both matrices and are symmetric, meaning A_{ij} = A_{ji} and B_{ij} = B_{ji}. The values satisfy 0 \leq A_{ij}, B_{ij} \leq 10^6.
The firefighters' queries are given as pairs , where they request the resistance between two houses. There are queries in total (Q \leq 10).
The input begins with three integers , , and . The next lines each contain two numbers and , representing a cable with resistance between houses and (1 \leq u, v \leq N). Following this, lines each contain numbers, where the -th element in the -th row corresponds to A_{ij}. Another lines follow, each containing numbers, where the -th element in the -th row corresponds to B_{ij}. Finally, the next lines each contain two numbers (1 \leq u, v \leq N), representing the firefighters' queries about the resistance between houses and .
For each of the queries, output a line containing either "Yes" (without quotes) if the resistance between the houses is within the allowed limits, along with the resistance value to a precision of 10^{-7}, or "No" (without quotes) if the resistance does not meet the specified conditions.
Esempio 1