#include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a); i<(b); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef long long ll;
typedef pair<int, int> pii;
const ll INF = 1ll<<29;
const bool debug = 0;

int N;
ll X[112345], R[112345];

long double solve(long double x) {
	long double res = 1e18;
	REP(i, N) chmin(res, R[i]*R[i] - (x-X[i])*(x-X[i]));
	return res;
}

int main() {
	cin >> N;
	REP(i, N) scanf("%lld %lld", X + i, R + i);
	
	long double l = -INF, r = INF;
	
	REP(i, N) {
		chmax(l, X[i] - R[i]);
		chmin(r, X[i] + R[i]);
	}
	
	REP(i, 300) {
		long double x1 = l + (r - l) / 3;
		long double x2 = r - (r - l) / 3;
		
		long double y1 = solve(x1), y2 = solve(x2);
		
		if (y1 <= y2) l = x1;
		else r = x2;
	}
	
	long double ans = sqrt(solve(l));
	printf("%.15lf\n", (double)ans);
	
	return 0;
}