#include <bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
template <typename T>
inline T sqr(T x) {
  return x * x;
}
template <typename T>
inline void read(T &x) {
  int f = 1;
  x = 0;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
int n;
double s, ans;
struct vec {
  double x, y;
} a[100005], x, y;
const vec o = (vec){0, 0};
inline vec operator+(vec a, vec b) { return (vec){a.x + b.x, a.y + b.y}; }
inline vec operator-(vec a, vec b) { return (vec){a.x - b.x, a.y - b.y}; }
inline vec operator*(vec a, vec b) {
  return (vec){a.x * b.x - a.y * b.y, a.y * b.x + a.x * b.y};
}
inline vec operator*(vec a, double x) { return (vec){a.x * x, a.y * x}; }
inline double dist(vec a, vec b) {
  return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y));
}
inline double calc(vec p, vec q) {
  if (abs(p.x - q.x) <= 1e-6) return p.x;
  double k = (p.y - q.y) / (p.x - q.x), b = p.y - k * p.x;
  return -b / k;
}
inline vec reverse(vec a, vec p, vec q) {
  a = a - p;
  q = q - p;
  vec w = q * (1.0 / dist(q, o));
  a = a * (vec){w.x, -w.y};
  a.y = -a.y;
  a = a * w;
  a = a + p;
  return a;
}
inline bool cmp(vec a, vec b) {
  return abs(dist(a, x) - dist(a, y)) < abs(dist(b, x) - dist(b, y));
}
int main() {
  read(n);
  read(s);
  x = (vec){s, 0.0};
  y = (vec){-s, 0.0};
  ans = 2 * s;
  for (int i = 1; i <= n; ++i) read(a[i].x), read(a[i].y);
  sort(a + 1, a + n + 1, cmp);
  int len = min(n, 50000000 / n);
  for (int i = 1; i <= len; ++i) {
    if (2 * s >= ans && abs(dist(a[i], x) - dist(a[i], y)) >= ans) continue;
    for (int j = i + 1; j <= n; ++j) {
      if (abs(a[i].y - a[j].y) <= 1e-6) continue;
      double t = calc(a[i], a[j]);
      if (t >= -s && t <= s) ans = min(ans, dist(y, reverse(x, a[i], a[j])));
    }
  }
  printf("%.8lf\n", ans);
  return 0;
}
