Problem: This is an interactive problem!
In the last regional contest Hemose, ZeyadKhattab and YahiaSherif — members of the team Carpe Diem — did not qualify to ICPC because of some unknown reasons. Hemose was very sad and had a bad day after the contest, but ZeyadKhattab is very wise and knows Hemose very well, and does not want to see him sad.
Zeyad knows that Hemose loves tree problems, so he gave him a tree problem with a very special device.
Hemose has a weighted tree with nodes and edges. Unfortunately, Hemose doesn't remember the weights of edges.
Let's define for as the greatest common divisor of the weights of all edges on the path from node to node .
Hemose has a special device. Hemose can give the device a set of nodes, and the device will return the largest between any two nodes from the set. More formally, if Hemose gives the device a set of nodes, the device will return the largest value of over all pairs with , and .
Hemose can use this Device at most times, and wants to find any two distinct nodes , , such that is maximum possible. Can you help him?
Note: The tree in the first sample: