#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long T = 0;
  int f = 0;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar()) f |= c == '-';
  for (; c >= '0' && c <= '9'; c = getchar()) T = T * 10 + c - '0';
  return f ? -T : T;
}
const double eps = 1e-7;
const int maxn = 1e5 + 233;
const double pi = acos(-1.0);
struct Vector {
  double x, y, r;
} A[maxn];
int n, a;
double ans;
struct WZP_AK_SZB {
  double l, r;
  bool operator<(const WZP_AK_SZB &n) const {
    if (l == n.l) return r > n.r;
    return l < n.l;
  }
} B[maxn];
int numB;
set<double> S;
set<double>::iterator it;
bool check(double x) {
  numB = 0;
  for (register int i = (1); i <= (n); ++i) {
    double dis = sqrt(((A[i].x - a) * (A[i].x - a)) + ((A[i].y) * (A[i].y)));
    if (dis > A[i].r + x || A[i].r > dis + x || x > dis + A[i].r) continue;
    double u = atan2(A[i].y, A[i].x - a);
    double t = acos((((dis) * (dis)) + ((x) * (x)) - ((A[i].r) * (A[i].r))) /
                    2.0 / dis / x);
    double l = u - t, r = u + t;
    if (l < -pi) l += 2 * pi;
    if (l > pi) l -= 2 * pi;
    if (r < -pi) r += 2 * pi;
    if (r > pi) r -= 2 * pi;
    if (l > r) swap(l, r);
    B[++numB].l = l;
    B[numB].r = r;
  }
  sort(B + 1, B + 1 + numB);
  S.clear();
  for (register int i = (1); i <= (numB); ++i) {
    it = S.upper_bound(B[i].l);
    if (it != S.end() && *it < B[i].r) return true;
    S.insert(B[i].r);
  }
  return false;
}
int main() {
  n = read(), a = read();
  for (register int i = (1); i <= (n); ++i) {
    A[i].x = read(), A[i].y = read();
    A[i].r = sqrt(((A[i].x + a) * (A[i].x + a)) + ((A[i].y) * (A[i].y)));
  }
  double l = 0.0;
  double r = 2.0 * a;
  while (r - l > 1e-7) {
    double mid = (l + r) / 2;
    if (check(mid)) {
      r = mid;
    } else {
      l = mid;
    }
  }
  printf("%.10lf\n", l);
}
