#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()

int main() {
  i64 n;
  cin >> n;
  vector<long double> x(n), r(n);
  for(int i = 0;i < n;i++) {
    cin >> x[i] >> r[i];
  }
  long double left = -1e18;
  for(int i = 0;i < n;i++) {
    left = max(left, x[i] - r[i]);
  }
  long double right = 1e18;
  for(int i = 0;i < n;i++) {
    right = min(right, x[i] + r[i]);
  }

  auto f = [&](long double k) -> long double {
    long double MIN = 1e18;
    for(int i = 0;i < n;i++) {
      long double l = abs(k - x[i]);
      MIN = min(MIN, sqrtl(r[i] * r[i] - l * l));
    }
    return MIN;
  } ;

  for(int i = 0;i < 90;i++) {
    long double a = (left * 2 + right) / 3;
    long double b = (left + right * 2) / 3;
    long double fa = f(a);
    long double fb = f(b);
    if(fa < fb) {
      left = a;
    }
    else {
      right = b;
    }
  }
  long double xx = left;
  cout << setprecision(10) << fixed << f(xx) << endl;
}

