/**
 * Author: Sergey Kopeliovich (Burunduk30@gmail.com5
 * Date: 2013.10.05
 *
 * Status: TL 20, Time > 5.0
 */

#include <cmath>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <algorithm>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define forab(i, a, b) for (int i = (a); i <= (b); i++)

typedef long double dbl;

struct pnt
{
  int x, y;

  pnt( int _x = 0, int _y = 0 ) : x(_x), y(_y) { }

  inline pnt operator - () const { return pnt(-x, -y); }

  inline pnt operator + ( const pnt &p ) const { return pnt(x + p.x, y + p.y); }
  inline pnt operator - ( const pnt &p ) const { return pnt(x - p.x, y - p.y); }
  inline pnt operator * ( const int &k ) const { return pnt(x * k, y * k); }
  inline pnt operator / ( const int &k ) const { return pnt(x / k, y / k); }

  inline int operator * ( const pnt &p ) const { return (int)x * p.y - (int)y * p.x; }
  inline int operator ^ ( const pnt &p ) const { return (int)x * p.x + (int)y * p.y; }

  inline bool operator == ( const pnt &p ) const { return x == p.x && y == p.y; }
  inline bool operator != ( const pnt &p ) const { return !(*this == p); }
  inline bool operator < ( const pnt &p ) const { return x < p.x || (x == p.x && y < p.y); }

  inline void read() { assert(scanf("%d%d", &x, &y) == 2); }

  inline int d2() const { return (int)x * x + (int)y * y; }
  inline dbl d() const  { return sqrt(d2()); }
  inline pnt ort() const { return pnt(-y, x); }

  void out() { printf("%d %d ", x, y); }
  void outln() { out(), puts(""); }
};

inline bool pless( const pnt &a, const pnt &b )
{
  int x = a * b;
  return x != 0 ? x < 0 : a.d2() < b.d2();
}

int ConvexHull( int n, pnt *p )
{
  int mi = 0;
  forn(i, n)
    if (p[mi] < p[i])
      mi = i;
  swap(p[0], p[mi]);
  forab(i, 1, n - 1)
    p[i] = p[i] - p[0];
  sort(p + 1, p + n, pless);

  int rn = 1;
  pnt st = p[0];
  forab(i, 1, n - 1)
  {
    pnt q = p[i] + st;
    while (rn >= 2 && (p[rn - 1] - p[rn - 2]) * (q - p[rn - 2]) >= 0)
      rn--;
    p[rn++] = q;
  }
  return rn;
}

const int N = 50;

int n, k, cnt = 0;
dbl opt = 1e9;
int ind[N], r_ind[N];
pnt p[N], t[N];

void go( int i, int pn )
{
  if (pn == k)
  {
    cnt++;
    forn(j, k)
      t[j] = p[ind[j]];
    int n = ConvexHull(k, t);
    dbl len = 0;
    forn(j, n)
      len += (t[(j + 1) % n] - t[j]).d();
    if (len < opt)
      opt = len, memcpy(r_ind, ind, sizeof(ind));
    return;
  }
  if (i == n)
    return;
  ind[pn] = i;
  go(i + 1, pn + 1);
  go(i + 1, pn);
}

int main()
{
  #define NAME "convexset"
  assert(freopen(NAME ".in", "r", stdin));
  assert(freopen(NAME ".out", "w", stdout));

  assert(scanf("%d%d", &n, &k) == 2 && n <= N);
  forn(i, n)
    p[i].read();
  go(0, 0);
  printf("%.15f\n", (double)opt);
  forn(i, k)
    printf("%d%c", r_ind[i] + 1, " \n"[i == k - 1]);
  fprintf(stderr, "cnt = %d\n", cnt);
  return 0;
}
                     