#include "bits/stdc++.h"

using namespace std;

typedef pair< long long, long long > P;
typedef pair< long long, P > PP;
typedef pair< P, P > PPP;

const long long MOD = 1e9 + 7;
const  long long  INF = 5e18;
const double DINF = 5e14;
const double eps = 1e-10;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };

#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define pb push_back
#define eb emplace_back
#define fr first
#define sc second

int n;
double x[100010], r[100010], low = 0, high = 1e9, mid;

bool check(double dist) {
	double L = -1e9, R =1e9;
	for (int i = 0;i < n;i++) {
		L = max(L, x[i] - sqrt(r[i] * r[i] - dist * dist));
		R = min(R, x[i] + sqrt(r[i] * r[i] - dist * dist));
	}
	return L < R;
}

int main() {
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> x[i] >> r[i];
		high = min(high, r[i]);
	}
	for (int i = 0;i < 100;i++) {
		mid = (low + high) / 2;
		if (check(mid))low = mid;
		else high = mid;
	}
	cout << setprecision(15) << low << endl;
	return 0;
}


