- Time limit: 1.50 s
- Memory limit: 128 MB
Syrjälä's computer network consists of computers and bidirectional connections between the computers. It is guarateed that there is path through connections from every computer to every other computer.
A vicious hacker has attacked Syrjälä's computer network. He has taken control of computers. The internet police of Syrjälä investigated the case and found some clues by tracking the network traffic of the attacked computers. In particular, he determined for every attacked computer the distance in the network between the attacked computer and hacker's computer. However the internet policeman is not so good at algorithms, so he asked you to help him find out which computers can be hacker's computer.
Input
The first line contains two integers, and , the number of computers in the network and number of computers being under attack.
Next lines contain two integers each, and that means that computers and are directly connected.
Next lines contain two integers each, and , that means that distance between computer and hacker's computer is .
There always exists at least one computer which is at distance from every , .
Output
Print two integers, the number of possible locations for hacker's computer, and one possible location for hacker's computer. If there are multiple answers, you can print any of them.
Constraints
Example
Input:
8 3 1 5 2 8 8 6 5 4 7 1 8 1 3 8 4 4 2 2 7 3
Output:
2 3
Possible locations for hacker's computer are and .