#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cmath>
#define INF 1e+9
using namespace std;

typedef pair<double,int> P;

int n,cnt = 0;
double x[100000],r[100000],lft,rit;

double calc(double tx){
	double mi = INF;
	for(int i = 0;i < n;i++){
		mi = min(mi,sqrt(r[i] * r[i] - (tx - x[i]) * (tx - x[i])));
	}
	return mi;
}

int main(){
	vector<P> vec;
	cin >> n;
	for(int i = 0;i < n;i++){
		cin >> x[i] >> r[i];
		vec.push_back(P(x[i] - r[i],-(i + 1)));
		vec.push_back(P(x[i] + r[i],i + 1));
	}
	sort(vec.begin(),vec.end());
	for(int i = 0;i < vec.size();i++){
		if(vec[i].second < 0){
			cnt++;
			if(cnt == n) lft = vec[i].first;
		}
		else{
			cnt--;
			if(cnt == n - 1) rit = vec[i].first;
		}
	}
	for(int i = 0;i < 100;i++){
		double t1 = (lft * 2.0 + rit) / 3.0,t2 = (lft + rit * 2.0) / 3.0;
		if(calc(t1) < calc(t2)) lft = t1;
		else rit = t2;
	}
	printf("%.5lf\n",calc(rit));
	return 0;
}