#include <bits/stdc++.h>
using namespace std;
typedef pair<double,double> P;

int main() {
  int n;
  cin >> n;
  P a[n];
  double l=0,r=1<<29;
  for(int i=0; i<n; i++) {
    cin >> a[i].first >> a[i].second;
    l=max(l,a[i].first-a[i].second);
    r=min(r,a[i].first+a[i].second);
  }
  double ans;
  for(int j=0; j<50; j++) {
    double m=(l+r)/2;
    double M=1<<29,x;
    for(int i=0; i<n; i++) {
      double d=a[i].second*a[i].second-(a[i].first-m)*(a[i].first-m);
      d=sqrt(d);
      if(d<M) {
        M=d;
        x=a[i].first;
        ans=d;
      }
    }
    if(x>m) l=m;
    else r=m;
  }
  printf("%.10f\n",ans);
  return 0;
}
