Long times ago, there are beautiful historic walls in the city. These walls divide the city into many parts of area.
Since it was not convenient, the new king wants to destroy some of these walls, so he can arrive anywhere from his castle. We assume that his castle locates at $(0.6*\sqrt 2 , 0.6*\sqrt 3 )$.
There are $n$ towers in the city, which numbered from 1 to n. The ith's location is $(x_i,y_i)$. Also, there are m walls connecting the towers. Specifically, the ith wall connects the tower $u_i$ and the tower $v_i$(including the endpoint). The cost of destroying the ith wall is $w_i$.
Now the king asks you to help him to divide the city. Firstly, the king wants to destroy as less walls as possible, and in addition, he wants to make the cost least.
The walls only intersect at the endpoint. It is guaranteed that no walls connects the same tower and no 2 walls connects the same pair of towers. Thait is to say, the given graph formed by the walls and towers doesn't contain any multiple edges or self-loops.
Initially, you should tell the king how many walls he should destroy at least to achieve his goal, and the minimal cost under this condition.