#include <bits/stdc++.h>
#define ll long long
#define db double
#define fi first
#define se second
#define pb push_back
#define all(x) begin(x), end(x)
#define allr(x) rbegin(x), rend(x)
#define szx(x) ((int)(x).size())
#define FOR(i, a, b) for (int i = a, _b = (b); i <= _b; ++i)
#define ROF(i, a, b) for (int i = a, _b = (b); i >= _b; --i)
#define REP(i, n) for (int i = 0, _n = (n); i < _n; ++i)
#define endl '\n'
using namespace std;
void setIO(string filename = "") {
    ios::sync_with_stdio(0);
    cin.tie(0);
    if (!filename.empty()) {
        if (ifstream(filename + ".in")) {
            freopen((filename + ".in").c_str(), "r", stdin);
            freopen((filename + ".out").c_str(), "w", stdout);
        }
    }
}
int n;
db l;
vector<pair<db, db>> cord;
bool ok(db x) {
    vector<pair<db, db>> cutted;
    REP(i, n) {
        if (cord[i].se > x) continue;
        db t = sqrt(x * x - cord[i].se * cord[i].se);
        db l0 = max(0.0, cord[i].fi - t);
        db r0 = min(l, cord[i].fi + t);
        if (l0 > r0) continue;
        cutted.pb({l0, r0});
        // cout << l << ' ' << r << ' ' << cord[i].fi << ' ' << cord[i].se << ' ' << x << endl;
    }
    sort(all(cutted));
    REP(i, szx(cutted) - 1)
    if (cutted[i].se < cutted[i + 1].fi)
        return 1;
    else {
        cutted[i + 1].fi = min(cutted[i + 1].fi, cutted[i].fi);
        cutted[i + 1].se = max(cutted[i + 1].se, cutted[i].se);
    }
    if (cutted.empty() || cutted.back().fi > 0 || cutted.back().se < l) return 1;
    return 0;
}
void solve() {
    cin >> n >> l;
    REP(i, n) {
        db x, y;
        cin >> x >> y;
        if (cord.empty() || cord.back().fi != x) cord.pb({x, y});
    }
    n = szx(cord);
    db l = 0,
       r = max({
               sqrt(cord[0].se * cord[0].se + (l - cord[0].fi) * (l - cord[0].fi)),
               sqrt(cord[0].se * cord[0].se + cord[0].fi * cord[0].fi),
               sqrt(cord[n - 1].se * cord[n - 1].se + (l - cord[n - 1].fi) * (l - cord[n - 1].fi)),
               sqrt(cord[n - 1].se * cord[n - 1].se + cord[n - 1].fi * cord[n - 1].fi),
           }) +
           0.001;
    while (r - l > 1e-5) {
        db m = (r + l) / 2;
        // cout << m << ' ' << ok(m) << endl;
        if (ok(m))
            l = m;
        else
            r = m;
    }
    cout << fixed << setprecision(6) << l;
}
int main() {
    setIO("socdist");
    int t = 1;
    // cin >> t;
    while (t--) solve();
}
컴파일 시 표준 에러 (stderr) 메시지
mobile.cpp: In function 'void setIO(std::string)':
mobile.cpp:22:20: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |             freopen((filename + ".in").c_str(), "r", stdin);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mobile.cpp:23:20: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   23 |             freopen((filename + ".out").c_str(), "w", stdout);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |