The Avaricious ISP

No attempts yetTime limit1sMemory limit128 MB

Problem

You run an internet service provider that charges by traffic. Your network manager insists on building the network from exactly two wireless antennas joined by one underground cable. Each antenna covers a circle centered on itself and you may pick the radius freely. No point of the plane may be covered by both antennas, because a device sitting where the two coverage areas overlap is confused to death.

Potential customers sit at known points of the plane. A customer joins the network if one of the two antennas covers her. Customer ii has a traffic desire did_i. When customers ii and jj are both covered, the daily traffic between them is di×djd_i \times d_j.

The only traffic you can measure is the traffic that passes through the underground cable, that is, the traffic between pairs of customers attached to different antennas. Choose the position and the radius of both antennas so that this traffic is as large as possible.

Input

The input holds several test cases. The first line of each test case has one integer NN (1N2001 \le N \le 200), the number of potential customers. Each of the next NN lines has the traffic desire did_i (1di2001 \le d_i \le 200) followed by the coordinates xix_i, yiy_i (106xi,yi106-10^6 \le x_i, y_i \le 10^6) of one potential customer, all integers. The input ends with a line containing a single 0.

In every test case, no three potential customers lie on one straight line.

Output

For each test case, print one line with the largest traffic that can pass through the underground cable when you choose the best position and radius for each antenna.