#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x;
  double y;
  double r1;
  double polar;
  double d;
};
const double PI = 2 * acos(0);
double norm(double v) {
  while (v >= PI) v -= 2 * PI;
  while (v < -PI) v += 2 * PI;
  return v;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  double a;
  cin >> n >> a;
  vector<Point> p(n);
  for (int _n(n), i(0); i < _n; i++) {
    double x, y;
    cin >> x >> y;
    double r1 = sqrt((x + a) * (x + a) + y * y);
    double d = sqrt((x - a) * (x - a) + y * y);
    p[i].r1 = r1;
    p[i].d = d;
    p[i].x = x;
    p[i].y = y;
    p[i].polar = atan2(y, x - a);
  }
  double left = 0.0;
  double right = 2 * a;
  vector<pair<double, int>> events(2 * n);
  vector<int> stack(2 * n);
  while (right - left > max(1.0, right) * 1e-9) {
    double r0 = (left + right) / 2;
    int nev = 0;
    bool done = false;
    for (int i = 0; i < n && !done; ++i) {
      Point &pp = p[i];
      double r1 = pp.r1;
      double d = pp.d;
      if (d + r1 <= r0) {
        right = r0;
        done = true;
        break;
      }
      double cosa = (r0 * r0 + d * d - r1 * r1) / (2 * r0 * d);
      if (cosa < 1 && cosa > -1) {
        double alpha = acos(cosa);
        double a1 = norm(pp.polar + alpha);
        double a2 = norm(pp.polar - alpha);
        events[nev].first = a1;
        events[nev].second = i;
        ++nev;
        events[nev].first = a2;
        events[nev].second = i;
        ++nev;
      }
    }
    if (done) continue;
    sort(events.begin(), events.begin() + nev);
    int sp = 0;
    for (int i = 0; i < nev; ++i) {
      int cur = events[i].second;
      if (sp > 0 && stack[sp - 1] == cur)
        --sp;
      else
        stack[sp++] = cur;
    }
    if (sp == 0) {
      left = r0;
    } else {
      right = r0;
    }
  }
  cout.precision(9);
  cout << fixed << right << endl;
  return 0;
}
