Statement
City A has buildings. The buildings are connected by bidirectional roads, and there is exactly one path between every pair of buildings.
Each road has a travel time. If a road connects buildings and and has travel time , traveling along that road takes units of time in either direction.
A huge meteorite is expected to fall into the sea near City A and cause a tsunami. To help citizens evacuate as quickly as possible, the mayor, Atli, will choose exactly one building and construct a shelter there.
If the shelter is built at building , let be the maximum shortest-path travel time from building to any building. In other words, is the travel time from the shelter to the farthest building.
Atli wants to choose the shelter location so that is minimized.
Find the minimum possible value of and the number of a building that achieves it. If several buildings achieve the same minimum value, print the smallest building number.
Input
The input is given in the following format:
Output
Print the minimum possible shelter cost on the first line.
On the second line, print the number of a building that achieves this cost. If several buildings do so, print the smallest building number.
Constraints
- .
- ().