There N people in your city. An id is associated with each of the citizens and numbered from 1 to N. You know the exact coordinates (x, y) of the location where each citizen lives. Your task is to move all these people to some buildings. You can build a building at any time at any place instantly. The building will be sustainable only if at least G people are moved to the building.
You are required to move each of the citizens by using the minimum possible time. People can move one unit distance per unit time and the distance of two locations in the 2D-plane is equal to their Euclidean distance.
Your task is to determine a solution so that the required time to move all the citizens to the building is minimized.
Input format
Output format
The format of the output is as follows:
Note:
Constraints
2≤N≤103
1≤xi,yi≤109
2≤G≤N
There is no way to build 2 safe houses with at least 3 citizens in each of them.
So we must move all the citizens to one safe house.
Best position to build the safe house is (1.5,1.5)