#include <iostream>
#include <cstdio>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <stdlib.h>
#include <functional>
#include <string>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered_map>
#include <nmmintrin.h>
#include <chrono>
#define rep(i,s,n) for(int i = (s); (n) > i; i++)
#define REP(i,n) rep(i,0,n)
#define RANGE(x,a,b) ((a) <= (x) && (x) <= (b))
#define DUPLE(a,b,c,d) (RANGE(a,c,d) || RANGE(b,c,d) || RANGE(c,a,b) || RANGE(d,a,b))
#define INCLU(a,b,c,d) (RANGE(a,c,d) && (b,c,d))
#define PW(x) ((x)*(x))
#define ALL(x) (x).begin(), (x).end()
#define MODU 1000000007
#define bitcheck(a,b)   ((a >> b) & 1)
#define bitset(a,b)      ( a |= (1 << b))
#define bitunset(a,b)    (a &= ~(1 << b))
#define MP(a,b) make_pair((a),(b))
#define Manh(a,b) (abs((a).first-(b).first) + abs((a).second - ((b).second))
#define pritnf printf
#define scnaf scanf
#define itn int
#ifdef _MSC_VER
#define __builtin_popcount _mm_popcnt_u32
#define __builtin_popcountll _mm_popcnt_u64
#endif
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a%b);
}
template<typename A, size_t N, typename T>
void Fill(A(&array)[N], const T &val) {
	std::fill((T*)array, (T*)(array + N), val);
}


struct UnionFind{
	vector<int> data;
	int n, m;

	UnionFind(int ns, int ms) : n(ns), m(ms), data(ns + ms, INT_MIN){
		REP(i, m){
			data[i + n] = -i-1;
		}
	}

	bool unite(int a, int b){//矛盾の判定
		a = root(a), b = root(b);

		if (a == b)
			return true;

		if (data[a] != INT_MIN && data[b] != INT_MIN){
			if (data[a] != data[b]){
				return false;
			}
			else {
				if (rand() % 2)
					data[b] = a;
				else
					data[a] = b;
			}
		}
		else if (data[a] != INT_MIN)
			data[b] = a;
		else if (data[b] != INT_MIN)
			data[a] = b;
		else{
			if (rand() % 2)
				data[b] = a;
			else
				data[a] = b;
		}
		return true;
	}


	bool unitebu(int a, int b){//矛盾の判定 aをbの部活
		a = root(a);
		b += n;

		if (data[a] == data[b])
			return true;
		if (data[a] != INT_MIN)
			return false;

		data[a] = b;
		return true;
	}

	bool findset(int a, int b){
		return root(a) == root(b);
	}

	int root(int x){
		return data[x] < 0 ? x : data[x] = root(data[x]);
	}
};

signed main() {
	int n;
	cin >> n;
	vector<pair<double,double>> za(n);
	vector<int> l, r;
	REP(i, n){
		scanf("%lf %lf", &za[i].first, &za[i].second);
		l.push_back(za[i].first - za[i].second);
		r.push_back(za[i].first + za[i].second);
	}

	sort(ALL(l));
	sort(ALL(r));

	int rb = r[0], lb = l[l.size()-1];


	function<double(double)> func = [&](double pos){
		double ret = 10000000;

		REP(i, n){
			double rad = za[i].second, dis = abs(pos - za[i].first);
			ret = min(ret, sqrt(rad*rad - dis*dis));
		}

		return ret;
	};

	double x0 = lb, x3 = rb;
	REP(i, 50){
		if (x0 >= x3)
			break;
		
		double x1 = (x0+x0+x3)/3, x2 = (x0 + x3 + x3)/3;

		if (func(x1) < func(x2))
			x0 = x1;
		else
			x3 = x2;

	}

	printf("%.6lf\n", func((x0 + x3) / 2));

	return 0;
}

Measured memory_bytes: 5696