CF14D Two Paths

Description

As you know, Bob's brother lives in Flatland. In Flatland there are $ n $ cities, connected by $ n-1 $ two-way roads. The cities are numbered from 1 to $ n $ . You can get from one city to another moving along the roads. The «Two Paths» company, where Bob's brother works, has won a tender to repair two paths in Flatland. A path is a sequence of different cities, connected sequentially by roads. The company is allowed to choose by itself the paths to repair. The only condition they have to meet is that the two paths shouldn't cross (i.e. shouldn't have common cities). It is known that the profit, the «Two Paths» company will get, equals the product of the lengths of the two paths. Let's consider the length of each road equals 1, and the length of a path equals the amount of roads in it. Find the maximum possible profit for the company.

Input Format

N/A

Output Format

N/A