Acquaintance#5273

Acquaintance

1 second
122.486 megabytes
Easy

A group of talented high-school students from the N-Region arrived at the national olympiad. The delegation consists of girls, and due to an unexpected situation, each girl was settled in a separate single hotel room.

On one evening before the olympiad tour, a sudden power outage affected one of the rooms. The girl in this room decided to continue her preparation and went to visit her closest friend in another room. The time it takes for her to reach her closest friend depends on the distance between their rooms.

The organizers want to find out which participant, when affected by the outage, would have the longest distance to her closest friend, and what this maximum distance could be.

Input

The first line contains two numbers and (1 \leq n,\, k \leq 10^{5}), the number of girls in the delegation and the number of pairs of friends among them.

Each of the next lines contains three numbers a_i, b_i and w_i: the indices of two friends and the distance between their rooms (1 \leq a_i,\, b_i \leq n, a_i \neq b_i, 1 \leq w_i \leq 10^{5}).

It is guaranteed that no pair of friends is listed more than once, and every girl has at least one friend.

Output

In the first line, print the maximum distance a girl would have to go to reach her closest friend in case of a power outage in her room.

In the second line, print the number of the girl who would have this maximum distance. If there are several such girls, print any of them.

Examples

Example 1

Loading
Loading