//2分探索, 座標圧縮的な何か, imos法
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <cmath>
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;

int n;
double x[100000], r[100000];

bool check(double y) {
	int i;
	vector<double> vec;
	static int imos[200001];
	
	rep(i, n) {
		if (y >= r[i]) return false;
		double width = sqrt(r[i] * r[i] - y * y);
		vec.push_back(x[i] - width);
		vec.push_back(x[i] + width);
	}
	sort(vec.begin(), vec.end());
	
	rep(i, 2 * n) imos[i] = 0;
	
	rep(i, n) {
		double width = sqrt(r[i] * r[i] - y * y);
		int l = lower_bound(vec.begin(), vec.end(), x[i] - width) - vec.begin();
		int r = lower_bound(vec.begin(), vec.end(), x[i] + width) - vec.begin();
		//区間l,l+1,…,r-1に1を足す
		imos[l]++;
		imos[r]--;
	}
	
	rep(i, 2 * n) if (i > 0) imos[i] += imos[i - 1];
	rep(i, 2 * n) if (imos[i] == n) return true;
	return false;
}

int main() {
	int i;
	
	cin >> n;
	rep(i, n) cin >> x[i] >> r[i];
	
	double st = 0, ed = 1000000, mid;	//ooooxxx, [st, ed)
	for (i = 0; i < 50; i++) {
		mid = (st + ed) / 2;
		if (check(mid)) st = mid;
		else ed = mid;
	}
	printf("%.14f\n", st);
	return 0;
}
