#include <bits/stdc++.h>

using namespace std;
using i64 = int64_t;

signed main(){
    
    int n;
    cin >> n;
    vector<i64> x(n), r(n);
    for(int i = 0; i < n; ++i)
        cin >> x[i] >> r[i];
    
    auto f = [&](double y){
        double mi = -1e18, ma = 1e18;
        for(int i = 0; i < n; ++i){
            if(r[i] * r[i] - y * y < 0)
                return false;
            double v = sqrt(r[i] * r[i] - y * y);
            if(mi < x[i] - v)
                mi = x[i] - v;
            if(ma > x[i] + v)
                ma = x[i] + v;
        }
        return mi <= ma;
    };
    double ok = 0, ng = 1e9 + 3;
    for(int i = 0; i < 500; ++i){
        double mid = (ok + ng) / 2;
        (f(mid) ? ok : ng) = mid;
    }
    printf("%.20lf\n", ok);
    
    return 0;
}
