#include <bits/stdc++.h>
using namespace std;
namespace SHENZHEBEI {
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 - 48 + ch;
  return x * f;
}
inline void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline char readchar() {
  char ch = getchar();
  for (; isspace(ch); ch = getchar())
    ;
  return ch;
}
inline int readstr(char *s) {
  char ch = getchar();
  int cur = 0;
  for (; isspace(ch); ch = getchar())
    ;
  for (; !isspace(ch); ch = getchar()) s[cur++] = ch;
  s[cur] = '\0';
  return cur;
}
inline void writeln(int x) {
  write(x);
  puts("");
}
inline double getreal() {
  static double lbc;
  scanf("%lf", &lbc);
  return lbc;
}
}  // namespace SHENZHEBEI
using namespace SHENZHEBEI;
const int N = 200010;
int n, A, sum, p[N];
double ans, x[N], y[N], X[N], Y[N], z[N];
bool cmp(int a, int b) { return z[a] < z[b]; }
int main() {
  srand(time(0));
  n = read(), A = read();
  ans = 2 * A;
  for (int i = 1; i <= n; ++i)
    y[i] = read(), x[i] = read(), sum += y[i] == 0,
    z[i] = ((sqrt(((x[i]) * (x[i])) + ((y[i] - A) * (y[i] - A))) -
             sqrt(((x[i]) * (x[i])) + ((y[i] + A) * (y[i] + A)))) > 0
                ? (sqrt(((x[i]) * (x[i])) + ((y[i] - A) * (y[i] - A))) -
                   sqrt(((x[i]) * (x[i])) + ((y[i] + A) * (y[i] + A))))
                : -(sqrt(((x[i]) * (x[i])) + ((y[i] - A) * (y[i] - A))) -
                    sqrt(((x[i]) * (x[i])) + ((y[i] + A) * (y[i] + A)))));
  if (sum >= 2) return puts("0"), 0;
  for (int i = 1; i <= n; ++i) p[i] = i;
  sort(p + 1, p + n + 1, cmp);
  for (int i = 1; i <= n; ++i) X[i] = x[p[i]], Y[i] = y[p[i]];
  for (int i = 1; i <= n; ++i) x[i] = X[i], y[i] = Y[i];
  for (int i = 1; i <= ((6000) < (n) ? (6000) : (n)); ++i) {
    for (int j = i + 1; j <= ((n / i * 200) < (n) ? (n / i * 200) : (n)); ++j) {
      if (y[i] == y[j]) {
        ((ans) =
             ((ans) > (((((y[i] - A) > 0 ? (y[i] - A) : -(y[i] - A)) -
                         ((y[i] + A) > 0 ? (y[i] + A) : -(y[i] + A))) > 0
                            ? (((y[i] - A) > 0 ? (y[i] - A) : -(y[i] - A)) -
                               ((y[i] + A) > 0 ? (y[i] + A) : -(y[i] + A)))
                            : -(((y[i] - A) > 0 ? (y[i] - A) : -(y[i] - A)) -
                                ((y[i] + A) > 0 ? (y[i] + A) : -(y[i] + A)))))
                  ? (((((y[i] - A) > 0 ? (y[i] - A) : -(y[i] - A)) -
                       ((y[i] + A) > 0 ? (y[i] + A) : -(y[i] + A))) > 0
                          ? (((y[i] - A) > 0 ? (y[i] - A) : -(y[i] - A)) -
                             ((y[i] + A) > 0 ? (y[i] + A) : -(y[i] + A)))
                          : -(((y[i] - A) > 0 ? (y[i] - A) : -(y[i] - A)) -
                              ((y[i] + A) > 0 ? (y[i] + A) : -(y[i] + A)))))
                  : (ans)));
        continue;
      }
      if (x[i] == x[j]) continue;
      double k = (y[i] - y[j]) / (x[i] - x[j]), b = y[i] - x[i] * k;
      if (b >= A || b <= -A) continue;
      double k1 = -1 / k, b1 = A, jiao_x = (b - b1) / (k1 - k),
             jiao_y = b + k * jiao_x;
      double XinShe_x = 2 * jiao_x, XinShe_y = 2 * jiao_y - A;
      ((ans) = ((ans) > (sqrt(((XinShe_x) * (XinShe_x)) +
                              ((-A - XinShe_y) * (-A - XinShe_y))))
                    ? (sqrt(((XinShe_x) * (XinShe_x)) +
                            ((-A - XinShe_y) * (-A - XinShe_y))))
                    : (ans)));
    }
    if (clock() > CLOCKS_PER_SEC * 0.9) break;
  }
  printf("%lf", ans);
}
