Problem: A new bus route is opened in the city <image>. The route is a closed polygon line in the place, with all segments parallel to one of the axes. m buses will operate on the route. All buses move in a loop along the route in the same direction with equal constant velocities (stopping times are negligible in this problem).

Buses start their movement in the first vertex of the route with equal interval. Suppose that T is the total time for a single bus to travel the whole loop of the route. Then, the bus 1 starts moving at time 0, the bus 2 starts at time T / m, the bus 3 starts at time 2T / m, and so on; finally, the bus m starts moving at time (m - 1)T / m. Thus, all intervals between pairs of consecutive buses (including the interval between the last and the first bus) are equal.

Buses can communicate with each other via wireless transmitters of equal power. If the transmitters have power D, then only buses within distance D of each other can communicate.

The buses are also equipped with a distributed system of schedule tracking. For all buses to stick to the schedule, the system has to synchronize the necessary data between all buses from time to time. At the moment of synchronization, the bus 1 communicates with the bus 2, the bus 2 — with bus 3, and so on; also, the bus m communicates with the bus 1.

As a research employee, you are tasked with finding the smallest value of D such that it is possible to find a time moment to perform synchronization once all buses have started moving. 

Input

The first line contains two integers n and m (2 ≤ n, m ≤ 105) — the number of vertices of the polygonal line, and the number of buses respectively.

Next n lines describe the vertices of the route in the traversing order. Each of these lines contains two integers xi, yi ( - 1000 ≤ xi, yi ≤ 1000) — coordinates of respective vertex.

It is guaranteed that each leg of the route (including the leg between the last and the first vertex) is paralles to one of the coordinate axes. Moreover, no two subsequent vertices of the route coincide. The route is allowed to have self-intersections, and travel along the same segment multiple times.

Output

Print one real number — the answer to the problem. Your answer will be accepted if the relative or the absolute error doesn't exceed 10 - 6.

Examples

Input

4 2
0 0
0 1
1 1
1 0


Output

1.000000000


Input

2 2
0 0
1 0


Output

0.000000000

Note

Suppose that each bus travel 1 distance unit per second.

In the first sample case, in 0.5 seconds buses will be at distance 1, hence we can choose D = 1.

In the second sample case, in 0.5 seconds both buses will be at (0.5, 0), hence we can choose D = 0.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
template <typename T>
inline T max(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
inline T min(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline bool repr(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
inline bool repl(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline T gcd(T a, T b) {
  T t;
  if (a < b) {
    while (a) {
      t = a;
      a = b % a;
      b = t;
    }
    return b;
  } else {
    while (b) {
      t = b;
      b = a % b;
      a = t;
    }
    return a;
  }
}
template <typename T>
inline T sqr(T x) {
  return x * x;
}
struct Cg {
  __attribute__((always_inline)) inline char operator()() { return getchar(); }
};
struct Cp {
  __attribute__((always_inline)) inline void operator()(char x) { putchar(x); }
};
__attribute__((always_inline)) inline bool IS(char x) {
  return x == 10 || x == 13 || x == ' ';
}
template <typename T>
struct Fr {
  T P;
  __attribute__((always_inline)) inline Fr &operator,(int &x) {
    x = 0;
    unsigned char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (f) x = -x;
    return *this;
  }
  __attribute__((always_inline)) inline operator int() {
    int x;
    *this, x;
    return x;
  }
  __attribute__((always_inline)) inline Fr &operator,(long long &x) {
    x = 0;
    unsigned char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (f) x = -x;
    return *this;
  }
  __attribute__((always_inline)) inline operator long long() {
    long long x;
    *this, x;
    return x;
  }
  __attribute__((always_inline)) inline Fr &operator,(char &x) {
    for (x = P(); IS(x); x = P())
      ;
    return *this;
  }
  __attribute__((always_inline)) inline operator char() {
    char x;
    *this, x;
    return x;
  }
  __attribute__((always_inline)) inline Fr &operator,(char *x) {
    char t = P();
    for (; IS(t); t = P())
      ;
    if (~t) {
      for (; !IS(t) && ~t; t = P()) *x++ = t;
    }
    *x++ = 0;
    return *this;
  }
  __attribute__((always_inline)) inline Fr &operator,(double &x) {
    x = 0;
    unsigned char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (t == '.') {
      double u = 0.1;
      for (t = P(); t >= '0' && t <= '9'; t = P(), u *= 0.1) x += u * (t - '0');
    }
    if (f) x = -x;
    return *this;
  }
  __attribute__((always_inline)) inline operator double() {
    double x;
    *this, x;
    return x;
  }
  __attribute__((always_inline)) inline Fr &operator,(long double &x) {
    x = 0;
    unsigned char t = P();
    while ((t < '0' || t > '9') && t != '-') t = P();
    bool f = 0;
    if (t == '-') t = P(), f = 1;
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    if (t == '.') {
      double u = 0.1;
      for (t = P(); t >= '0' && t <= '9'; t = P(), u *= 0.1) x += u * (t - '0');
    }
    if (f) x = -x;
    return *this;
  }
  __attribute__((always_inline)) inline operator long double() {
    long double x;
    *this, x;
    return x;
  }
  __attribute__((always_inline)) inline Fr &operator,(unsigned int &x) {
    x = 0;
    unsigned char t = P();
    while (t < '0' || t > '9') t = P();
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    return *this;
  }
  __attribute__((always_inline)) inline operator unsigned int() {
    unsigned int x;
    *this, x;
    return x;
  }
  __attribute__((always_inline)) inline Fr &operator,(unsigned long long &x) {
    x = 0;
    unsigned char t = P();
    while (t < '0' || t > '9') t = P();
    x = t - '0';
    for (t = P(); t >= '0' && t <= '9'; t = P()) x = x * 10 + t - '0';
    return *this;
  }
  __attribute__((always_inline)) inline operator unsigned long long() {
    unsigned long long x;
    *this, x;
    return x;
  }
};
Fr<Cg> in;
template <typename T>
struct Fw {
  T P;
  __attribute__((always_inline)) inline Fw &operator,(int x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      unsigned char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(int x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      unsigned char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator,(unsigned int x) {
    if (x) {
      unsigned char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(unsigned int x) {
    if (x) {
      unsigned char s[10], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator,(long long x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      unsigned char s[19], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(long long x) {
    if (x) {
      if (x < 0) P('-'), x = -x;
      unsigned char s[19], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator,(unsigned long long x) {
    if (x) {
      unsigned char s[20], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(unsigned long long x) {
    if (x) {
      unsigned char s[20], c = 0;
      while (x) s[c++] = x % 10 + '0', x /= 10;
      while (c--) P(s[c]);
    } else
      P('0');
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator,(char x) {
    P(x);
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(char x) {
    P(x);
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator,(const char *x) {
    while (*x) P(*x++);
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(const char *x) {
    while (*x) P(*x++);
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(double x, int y) {
    if (y) {
      double t = 0.5;
      for (int i = y; i--;) t *= 0.1;
      if (x >= 0)
        x += t;
      else
        x -= t, P('-');
      *this, (long long)(abs(x));
      P('.');
      if (x < 0) x = -x;
      while (y--) {
        x *= 10;
        x -= floor(x * 0.1) * 10;
        P(((int)x) % 10 + '0');
      }
    } else if (x >= 0)
      *this, (long long)(x + 0.5);
    else
      *this, (long long)(x - 0.5);
    ;
    return *this;
  }
  __attribute__((always_inline)) inline Fw &operator()(long double x, int y) {
    if (y) {
      double t = 0.5;
      for (int i = y; i--;) t *= 0.1;
      if (x >= 0)
        x += t;
      else
        x -= t, P('-');
      *this, (long long)(abs(x));
      P('.');
      if (x < 0) x = -x;
      while (y--) {
        x *= 10;
        x -= floor(x * 0.1) * 10;
        P(((int)x) % 10 + '0');
      }
    } else if (x >= 0)
      *this, (long long)(x + 0.5);
    else
      *this, (long long)(x - 0.5);
    ;
    return *this;
  }
};
Fw<Cp> out;
struct vec {
  double x, y;
  vec() {}
  vec(double a, double b) { x = a, y = b; }
  inline vec &operator+=(const vec &a) {
    x += a.x, y += a.y;
    return *this;
  }
  inline vec &operator-=(const vec &a) {
    x -= a.x, y -= a.y;
    return *this;
  }
  inline vec &operator/=(const double &a) {
    x /= a, y /= a;
    return *this;
  }
  inline vec &operator*=(const double &a) {
    x *= a, y *= a;
    return *this;
  }
  inline vec operator+(const vec &b) const {
    vec a = *this;
    a += b;
    return a;
  }
  inline vec operator-(const vec &b) const {
    vec a = *this;
    a -= b;
    return a;
  }
  inline vec operator/(const double &b) const {
    vec a = *this;
    a /= b;
    return a;
  }
  inline vec operator*(const double &b) const {
    vec a = *this;
    a *= b;
    return a;
  }
  inline double operator*(const vec &a) const { return x * a.x + y * a.y; }
  inline double operator%(const vec &a) const { return x * a.y - y * a.x; }
  inline double sqrd() const { return sqr(x) + sqr(y); }
  inline double d() { return sqrt(sqrd()); }
  inline double a() { return atan2(y, x); }
};
inline double sqrdis(const vec &a, const vec &b) {
  return sqr(a.x - b.x) + sqr(a.y - b.y);
}
inline double dis(const vec &a, const vec &b) { return sqrt(sqrdis(a, b)); }
inline vec rotl(const vec &a) { return vec(-a.y, a.x); }
inline vec rotr(const vec &a) { return vec(a.y, -a.x); }
struct line {
  vec a, b;
  line() {}
  line(vec x, vec y) { a = x, b = y; }
  inline vec pos(double x) { return a + b * x; }
};
inline double intf(const line &a, const line &b) {
  return (b.b % (a.a - b.a)) / (a.b % b.b);
}
inline vec intsec(const line &a, const line &b) {
  return a.a + a.b * intf(a, b);
}
inline line rotl(const line &a) { return line(a.a, rotl(a.b)); }
inline line rotr(const line &a) { return line(a.a, rotr(a.b)); }
const int N = 200005;
const double eps = 1e-7;
struct data {
  double a, b, c, r;
  inline double f() { return f(r); }
  inline double f(double x) { return c + x * (b + a * x); }
};
int n, m, u, lp;
vec s[N];
double c, lt, p[N];
std::vector<data> f[N];
inline double cal(int a, int b, double x, double y) {
  line la(s[a], s[a + 1] - s[a]), lb(s[b], s[b + 1] - s[b]);
  vec u = la.pos(x / (p[a + 1] - p[a]));
  vec v = lb.pos(y / (p[b + 1] - p[b]));
  return sqrdis(u, v);
}
inline void _solve(int _a, int _b, double x, double y, double l) {
  if (l < eps) return;
  double u = cal(_a, _b, x, y), v = cal(_a, _b, x + l / 2, y + l / 2),
         w = cal(_a, _b, x + l, y + l);
  double a = (u + w - v * 2) / (l * l) * 2;
  double b = (w - u - (l * lt * 2 + l * l) * a) / l;
  double c = u - lt * lt * a - lt * b;
  if (abs(a) < eps)
    f[lp].push_back((data){a, b, c, lt + l});
  else {
    double t = -.5 * b / a;
    if (t <= lt || t >= lt + l)
      f[lp].push_back((data){a, b, c, lt + l});
    else
      f[lp].push_back((data){a, b, c, t}),
          f[lp].push_back((data){a, b, c, lt + l});
  }
}
inline void solve(int a, int b, double x, double y, double l) {
  while (lt + l >= c) {
    double t = min(l, c - lt);
    _solve(a, b, x, y, t);
    x += t, y += t, l -= t, lt = 0;
    lp++;
  }
  _solve(a, b, x, y, l), lt += l;
}
inline void merge(std::vector<data> &a, std::vector<data> &b) {
  std::vector<data> res;
  auto add = [&](data x, data y, double l, double r) {
    if (r - l < eps) return;
    if (abs(x.a - y.a) < eps && abs(x.b - y.b) < eps && abs(x.c - y.c) < eps) {
      res.push_back((data){x.a, x.b, x.c, r});
      return;
    }
    bool lp = x.f(l) > y.f(l), rp = x.f(r) > y.f(r);
    if (lp == rp) {
      if (lp)
        res.push_back((data){x.a, x.b, x.c, r});
      else
        res.push_back((data){y.a, y.b, y.c, r});
      return;
    }
    double a = x.a - y.a, b = x.b - y.b, c = x.c - y.c, u, v;
    if (abs(a) > eps) {
      double ar = .5 / a;
      u = -b * ar, v = sqrt(b * b - 4 * a * c) * ar;
      if (u - v > l - eps && u - v < r + eps)
        u -= v;
      else
        u += v;
    } else {
      u = -c / b;
    }
    if (lp)
      res.push_back((data){x.a, x.b, x.c, u});
    else
      res.push_back((data){y.a, y.b, y.c, u});
    if (rp)
      res.push_back((data){x.a, x.b, x.c, r});
    else
      res.push_back((data){y.a, y.b, y.c, r});
  };
  int j = 0;
  double al = 0, bl = 0;
  for (int i = 0, iend = a.size(); i < iend; i++) {
    for (; j < b.size() && b[j].r < a[i].r; j++) {
      add(a[i], b[j], max(al, bl), b[j].r);
      bl = b[j].r;
    }
    if (j < b.size()) add(a[i], b[j], max(al, bl), a[i].r);
    al = a[i].r;
  }
  res.swap(a);
  std::vector<data> tmp;
  tmp.swap(b);
}
inline void work(int l, int r) {
  if (l == r) return;
  int t = (l + r) >> 1;
  work(l, t), work(t + 1, r);
  merge(f[l], f[t + 1]);
}
int main() {
  in, n, m;
  for (int i = 0, iend = n; i < iend; i++) in, s[i].x, s[i].y;
  for (int i = 0, iend = n; i <= iend; i++) s[i + n] = s[i];
  for (int i = 1, iend = n * 2; i <= iend; i++)
    p[i] = p[i - 1] + dis(s[i], s[i - 1]);
  c = p[n] / m;
  int j = 0;
  for (; p[j] < c; j++)
    ;
  for (int i = 0, iend = n; i < iend; i++) {
    int k = j;
    for (; p[k] < p[i + 1] + c; k++)
      ;
    if (j == k) {
      solve(i, j - 1, 0, p[i] + c - p[j - 1], p[i + 1] - p[i]);
      continue;
    }
    solve(i, j - 1, 0, p[i] + c - p[j - 1], p[j] - c - p[i]);
    for (j++; j < k; j++) {
      solve(i, j - 1, p[j - 1] - c - p[i], 0, p[j] - p[j - 1]);
    }
    solve(i, k - 1, p[k - 1] - c - p[i], 0, p[i + 1] + c - p[k - 1]);
    j = k;
  }
  work(0, m - 1);
  double ans = 1e9;
  for (__typeof((f[0]).end()) i = (f[0]).begin(); i != (f[0]).end(); ++i)
    repl(ans, i->f());
  printf("%.10lf\n", sqrt(ans));
}