Problem: Equilateral Triangular Fence

Ms. Misumi owns an orchard along a straight road. Recently, wild boars have been witnessed strolling around the orchard aiming at pears, and she plans to construct a fence around many of the pear trees.

The orchard contains n pear trees, whose locations are given by the two-dimensional Euclidean coordinates (x1, y1),..., (xn, yn). For simplicity, we neglect the thickness of pear trees. Ms. Misumi's aesthetic tells that the fence has to form a equilateral triangle with one of its edges parallel to the road. Its opposite apex, of course, should be apart from the road. The coordinate system for the positions of the pear trees is chosen so that the road is expressed as y = 0, and the pear trees are located at y ≥ 1.

Due to budget constraints, Ms. Misumi decided to allow at most k trees to be left outside of the fence. You are to find the shortest possible perimeter of the fence on this condition.

The following figure shows the first dataset of the Sample Input. There are four pear trees at (−1,2), (0,1), (1,2), and (2,1). By excluding (−1,2) from the fence, we obtain the equilateral triangle with perimeter 6.

<image>

Input

The input consists of multiple datasets, each in the following format.

> n
>  k
>  x1 y1
>  ...
>  xn yn
>

Each of the datasets consists of n+2 lines. n in the first line is the integer representing the number of pear trees; it satisfies 3 ≤ n ≤ 10 000. k in the second line is the integer representing the number of pear trees that may be left outside of the fence; it satisfies 1 ≤ k ≤ min(n−2, 5 000). The following n lines have two integers each representing the x- and y- coordinates, in this order, of the locations of pear trees; it satisfies −10 000 ≤ xi ≤ 10 000, 1 ≤ yi ≤ 10 000. No two pear trees are at the same location, i.e., (xi, yi)=(xj, yj) only if i=j.

The end of the input is indicated by a line containing a zero. The number of datasets is at most 100.

Output

For each dataset, output a single number that represents the shortest possible perimeter of the fence. The output must not contain an error greater than 10−6.

Sample Input


4
1
0 1
1 2
-1 2
2 1
4
1
1 1
2 2
1 3
1 4
4
1
1 1
2 2
3 1
4 1
4
1
1 2
2 1
3 2
4 2
5
2
0 1
0 2
0 3
0 4
0 5
6
3
0 2
2 2
1 1
0 3
2 3
1 4
0


Output for the Sample Input


6.000000000000
6.928203230276
6.000000000000
7.732050807569
6.928203230276
6.000000000000






Example

Input

4
1
0 1
1 2
-1 2
2 1
4
1
1 1
2 2
1 3
1 4
4
1
1 1
2 2
3 1
4 1
4
1
1 2
2 1
3 2
4 2
5
2
0 1
0 2
0 3
0 4
0 5
6
3
0 2
2 2
1 1
0 3
2 3
1 4
0


Output

6.000000000000
6.928203230276
6.000000000000
7.732050807569
6.928203230276
6.000000000000

Solution (in CPP):

Solution:
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<unordered_map>
#include<stack>
#include<string>
#include<algorithm>
#include<functional>
#include<cstring>
#include<complex>
#include<cmath>
using namespace std;

typedef long long ll;
typedef pair<double, ll> P;

ll n, k, x[10000], y[10000], d[10000];
vector<P> v[3];
double ans = 10000000.0;
double sqrt3 = sqrt(3);

double check(ll i, ll j, ll k) {
  return sqrt3 * (y[j] + y[k] - 2 * y[i]) + 3 * (x[j] - x[k]);
}

int main() {
  while (scanf("%lld", &n), n) {
    ans = 100000000.0;
    scanf("%lld", &k);
    for (ll i = 0; i < n; i++) {
      scanf("%lld%lld", &x[i], &y[i]);
      v[0].push_back(P(y[i], i));
      v[1].push_back(P(sqrt3 * x[i] + y[i], i));
      v[2].push_back(P(-sqrt3 * x[i] + y[i], i));
      d[i] = 0;
    }
    sort(v[0].begin(), v[0].end());
    sort(v[1].begin(), v[1].end());
    sort(v[2].begin(), v[2].end());
    for (ll i = 0; i <= k; i++) {
      for (ll j = 0; j < n; j++) if (d[j] != -1) d[j] = 1;
      ll counter = i, l = n-1, r = n-1;
      while (counter < k) {
        if (d[v[2][l].second] != -1) d[v[2][l].second] = 0, counter++;
        l--;
      }
      while (d[v[2][l].second] == -1) l--;
      while (d[v[1][r].second] != 1) {
        if (d[v[1][r].second] != -1) d[v[1][r].second] = -2;
        r--;
      }
      ans = min(ans, check(v[0][i].second, v[1][r].second, v[2][l].second));

      while (1) {
        l++;
        while (l < n && d[v[2][l].second] < 0) l++;
        if (l == n) break;
        d[v[2][l].second] = 1;
        d[v[1][r].second] = -2;
        r--;
        while (d[v[1][r].second] != 1) {
          if (d[v[1][r].second] != -1) d[v[1][r].second] = -2;
          r--;
        }
        ans = min(ans, check(v[0][i].second, v[1][r].second, v[2][l].second));
      }
      d[v[0][i].second] = -1;
    }
    printf("%.7f\n", ans);
    for (ll i = 0; i < 3; i++) v[i].clear();
  }
}