#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c = getchar();
  int tot = 1;
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    tot = -1;
    c = getchar();
  }
  int sum = 0;
  while (c >= '0' && c <= '9') {
    sum = sum * 10 + c - '0';
    c = getchar();
  }
  return sum * tot;
}
inline void wr(int x) {
  if (x < 0) {
    putchar('-');
    wr(-x);
    return;
  }
  if (x >= 10) wr(x / 10);
  putchar(x % 10 + '0');
}
inline void wrn(int x) {
  wr(x);
  putchar('\n');
}
inline void wri(int x) {
  wr(x);
  putchar(' ');
}
int n, m, c;
double ans;
struct p {
  double x, y;
  double z;
} z[200005];
inline double get_dis(p a, p b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
inline double check(p a) { return get_dis(a, z[0]) - get_dis(a, z[n + 1]); }
bool cmp(p a, p b) { return a.z < b.z; }
inline double get_ans(p x, p y) {
  double wx = z[0].x, wy = z[0].y;
  if (x.x == y.x)
    wx = 2 * x.x - wx;
  else {
    double k = 1.0 * (y.y - x.y) / (y.x - x.x), b = x.y - k * x.x,
           kk = -1.0 / k;
    double d =
        2 *
        abs((z[0].x - x.x) * (z[0].y - y.y) - (z[0].y - x.y) * (z[0].x - y.x)) /
        sqrt((x.x - y.x) * (x.x - y.x) + (x.y - y.y) * (x.y - y.y));
    double tx = d / sqrt(kk * kk + 1), ty = tx * kk;
    if ((k * wx + b > wy) ^ (k * (wx + tx) + b > (wy + ty)))
      wx = wx + tx, wy = wy + ty;
    else
      wx = wx - tx, wy = wy - ty;
  }
  return sqrt((z[n + 1].x - wx) * (z[n + 1].x - wx) +
              (z[n + 1].y - wy) * (z[n + 1].y - wy));
}
signed main() {
  n = read();
  c = read();
  z[0].x = c;
  z[0].y = 0;
  for (int i = 1; i <= n; i++) {
    z[i].x = read();
    z[i].y = read();
    z[i].z = fabs(sqrt(((z[i].x - c) * (z[i].x - c)) + ((z[i].y) * (z[i].y))) -
                  sqrt(((z[i].x + c) * (z[i].x + c)) + ((z[i].y) * (z[i].y))));
  }
  sort(z + 1, z + 1 + n, cmp);
  n = min(n, 850);
  z[n + 1].x = -c;
  z[n + 1].y = 0;
  ans = c * 2;
  for (int i = 1; i < n; i++) {
    if (fabs(check(z[i])) > ans) continue;
    for (int j = i + 1; j <= n; j++) {
      if (fabs(check(z[j])) > ans) continue;
      ans = min(ans, get_ans(z[i], z[j]));
    }
  }
  printf("%.10lf", ans);
  return 0;
}
