#P7806. Laser Beam Destruction

    ID: 20992 Type: Default 1000ms 256MiB

Laser Beam Destruction

Laser Beam Destruction

You are given N points in the plane. The ith point has coordinates \( (x_i, y_i) \). A laser beam is defined as a straight line passing through the origin with equation \( y = kx \) (with any real \( k \)). A point is considered to be hit by a beam if its distance to the beam is at most \( d \). The distance from point \( (x_i,y_i) \) to the line \( y=kx \) is given by

[ \frac{|k x_i - y_i|}{\sqrt{1+k^2}} \le d. ]

You are allowed to fire at most K laser beams (i.e. choose at most K values of \( k \)). Determine the minimum possible value of \( d \) such that every point can be covered (i.e. hit) by at least one of the beams. The answer should be printed with at least 6 decimal places of precision.

inputFormat

The first line contains two integers \( N \) and \( K \) (1 ≤ N ≤ 105, 1 ≤ K ≤ N) --- the number of points and the maximum number of laser beams allowed.

Each of the following \( N \) lines contains two integers \( x_i \) and \( y_i \) (|\( x_i \)|, |\( y_i \)| ≤ 109) representing the coordinates of the \( ith \) point.

outputFormat

Output a single number --- the minimum cost \( d \) required to hit all points using at most \( K \) laser beams. The answer must be correct up to at least 6 decimal places.

sample

1 1
2 4
0.000000

</p>