#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#define pb push_back
#define INF (1LL<<60)
#define MOD 1000000007
#define double long double

int N;
long long X[100000], R[100000];

double f(double p) {
  double h = 1e20;
  rep(i, N) {
    double d = abs(X[i] - p);
    h = min(h, R[i]*R[i] - d*d);
  }
  return sqrt(h);
}

signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> N;
  long long l = -INF, r = INF;
  rep(i, N) {
    cin >> X[i] >> R[i];
    l = max(l, 0LL+X[i]-R[i]);
    r = min(r, 0LL+X[i]+R[i]);
  }
  if (l >= r) {
    cout << "0.0" << "\n";
    return 0;
  }
  double lo = l, hi = r;
  rep(_, 300) {
    double a = (lo + lo + hi) / 3;
    double b = (lo + hi + hi) / 3;
    if (f(a) >= f(b)) hi = b;
    else lo = a;
  }
  cout << fixed << setprecision(20) << f(hi) << "\n";
  return 0;
}