#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
template <typename T>
void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
void chkmin(T &x, T y) {
  x = min(x, y);
}
const int N = 100010;
const long double eps = 1e-8;
struct node {
  long double x, y;
};
const node o = {0, 0};
long double Sqr(long double x) { return x * x; }
long double dis(node a, node b) {
  return sqrt(Sqr(a.x - b.x) + Sqr(a.y - b.y));
}
node operator*(node a, long double b) { return (node){a.x * b, a.y * b}; }
node operator+(node a, node b) { return (node){a.x + b.x, a.y + b.y}; }
node operator-(node a, node b) { return (node){a.x - b.x, a.y - b.y}; }
node operator*(node a, node b) {
  return (node){a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x};
}
node calc(node p, node a, node b) {
  b = b - a;
  p = p - a;
  node w = b * (1.0 / dis(b, o));
  p = p * (node){w.x, -w.y};
  p.y = -p.y;
  p = p * w;
  p = p + a;
  return p;
}
long double K(node p, node q) {
  if (abs(p.x - q.x) <= eps) return p.x;
  long double k = (p.y - q.y) / (p.x - q.x), b = p.y - k * p.x;
  return -b / k;
}
node A, B, b[N];
long double ans, a, D;
int n;
bool cmp(node a, node b) {
  return abs(dis(a, A) - dis(a, B)) < abs(dis(b, A) - dis(b, B));
}
int main() {
  read(n), read(a);
  a = abs(a);
  ans = a * 2;
  A = (node){a, 0};
  B = (node){-a, 0};
  for (int i = 1; i <= n; ++i) read(b[i].x), read(b[i].y);
  sort(b + 1, b + n + 1, cmp);
  int m = min(n, 60000000 / n);
  for (int i = 1; i <= m; ++i) {
    if (abs(dis(b[i], A) - dis(b[i], B)) >= ans) continue;
    for (int j = i + 1; j <= n; ++j) {
      if (abs(b[i].y - b[j].y) <= eps) continue;
      D = K(b[i], b[j]);
      if (D > -a && D < a) ans = min(ans, dis(A, calc(B, b[i], b[j])));
    }
  }
  cout << fixed << setprecision(10) << ans << '\n';
  return 0;
}
