#pragma GCC optimized("-O3")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define lf __float128
#define pb push_back
#define x first
#define y second
int n;
const int N=2e5+5;
ld x[N],y[N];
ld efs=1e-15;
bool f(lf r){
ld minx,maxx;
minx=-1e12,maxx=1e12;
int i;
for(i=1;i<=n;i++){
lf val;
val=fabs((ld)r-y[i]);
if(y[i]>r+r)
return 0;
ld temp;
temp=((r*r)-(val*val));
temp=sqrt(temp);
minx=max(minx,x[i]-temp);
maxx=min(maxx,x[i]+temp);
}
return minx<=(maxx+efs);
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int i;
//assert(freopen("input.txt","r",stdin));
//assert(freopen("output.txt","w",stdout));
cin>>n;
int f1=0,f2=0;
for(i=1;i<=n;i++){
cin>>x[i]>>y[i];
if(y[i]<0)
f2++;
if(y[i]>0)
f1++;
y[i]=fabs(y[i]);
}
//cout<<f1<<" "<<f2;
if(f1*f2){
cout<<-1;
return 0;
}
ld l=0,r=1e18;
//cout<<f(0);
for(i=(n>100?55:200);i;i--){
lf mid;
mid=(l+r)/2;
if(f(mid))
r=mid;
else
l=mid;
}
cout<<fixed<<setprecision(20);
cout<<(l+r)/2;
return 0;
}
I3ByYWdtYSBHQ0Mgb3B0aW1pemVkKCItTzMiKQojaW5jbHVkZTxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojZGVmaW5lIGxsIGxvbmcgbG9uZwojZGVmaW5lIGxkIGxvbmcgZG91YmxlCiNkZWZpbmUgbGYgX19mbG9hdDEyOAojZGVmaW5lIHBiIHB1c2hfYmFjawojZGVmaW5lIHggZmlyc3QKI2RlZmluZSB5IHNlY29uZAppbnQgbjsKY29uc3QgaW50IE49MmU1KzU7CmxkIHhbTl0seVtOXTsKbGQgZWZzPTFlLTE1Owpib29sIGYobGYgcil7CiAgICBsZCBtaW54LG1heHg7IAogICAgbWlueD0tMWUxMixtYXh4PTFlMTI7CiAgICBpbnQgaTsKICAgIGZvcihpPTE7aTw9bjtpKyspewogICAgICAgIGxmIHZhbDsKICAgICAgICB2YWw9ZmFicygobGQpci15W2ldKTsKICAgICAgICBpZih5W2ldPnIrcikKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgbGQgdGVtcDsKICAgICAgICB0ZW1wPSgocipyKS0odmFsKnZhbCkpOwogICAgICAgIHRlbXA9c3FydCh0ZW1wKTsKICAgICAgICBtaW54PW1heChtaW54LHhbaV0tdGVtcCk7CiAgICAgICAgbWF4eD1taW4obWF4eCx4W2ldK3RlbXApOwogICAgfQogICAgcmV0dXJuIG1pbng8PShtYXh4K2Vmcyk7Cn0KaW50IG1haW4oKXsKICAgIGlvczo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsKICAgIGNpbi50aWUoMCk7CiAgICBjb3V0LnRpZSgwKTsKICAgIGludCBpOwogICAgLy9hc3NlcnQoZnJlb3BlbigiaW5wdXQudHh0IiwiciIsc3RkaW4pKTsKICAgIC8vYXNzZXJ0KGZyZW9wZW4oIm91dHB1dC50eHQiLCJ3IixzdGRvdXQpKTsKICAgIGNpbj4+bjsKICAgIGludCBmMT0wLGYyPTA7CiAgICBmb3IoaT0xO2k8PW47aSsrKXsKICAgICAgICBjaW4+PnhbaV0+PnlbaV07CiAgICAgICAgaWYoeVtpXTwwKQogICAgICAgICAgICBmMisrOwogICAgICAgIGlmKHlbaV0+MCkKICAgICAgICAgICAgZjErKzsKICAgICAgICB5W2ldPWZhYnMoeVtpXSk7CiAgICB9CiAgICAvL2NvdXQ8PGYxPDwiICI8PGYyOwogICAgaWYoZjEqZjIpewogICAgICAgIGNvdXQ8PC0xOwogICAgICAgIHJldHVybiAwOwogICAgfQogICAgbGQgbD0wLHI9MWUxODsKICAgIC8vY291dDw8ZigwKTsKICAgIGZvcihpPShuPjEwMD81NToyMDApO2k7aS0tKXsKICAgICAgICBsZiBtaWQ7CiAgICAgICAgbWlkPShsK3IpLzI7CiAgICAgICAgaWYoZihtaWQpKQogICAgICAgICAgICByPW1pZDsKICAgICAgICBlbHNlCiAgICAgICAgICAgIGw9bWlkOwogICAgfQogICAgY291dDw8Zml4ZWQ8PHNldHByZWNpc2lvbigyMCk7CiAgICBjb3V0PDwobCtyKS8yOwogICAgcmV0dXJuIDA7Cn0=
MjAKCjc1NzE1NDIgOTg2ODg3OQoKMzYzNDkzNCA1OTg2OTg3CgoyMjk3NjUxIDU1Mzg3OTUKCjk3MDE1ODIgODI1MDcyMQoKLTI5MTMxNjggNDk2ODQ4MwoKODgzODY3NCA1NzcxODgzCgotMzM0ODc3OCA4MzI2MzM1CgotNTc3Nzk3IDc1MDE2MQoKLTcyMjMxMzggOTExMzUxMgoKLTE4MDgxNDYgNjA0NDkyNgoKLTc1NjQ0NiA0MTczODgKCjQ3MDA0MTcgMTU1MDE0OAoKLTU1Njg5MzcgMjAwMjkKCi05MTcwNzA3IDYxMDM4OTMKCjc0NDU2NTUgNzE2MTg0MwoKODgyMDUxMCA0MTQ1ODY3CgotNDQ2Njk3NCA5MjgwNTE4Cgo1ODQyNzkyIDE5MDU2OTcKCi04Nzg0MDYzIDMyNTM1MjQKCi03OTY1OTYgMTA2MDI3OQo=
20
7571542 9868879
3634934 5986987
2297651 5538795
9701582 8250721
-2913168 4968483
8838674 5771883
-3348778 8326335
-577797 750161
-7223138 9113512
-1808146 6044926
-756446 417388
4700417 1550148
-5568937 20029
-9170707 6103893
7445655 7161843
8820510 4145867
-4466974 9280518
5842792 1905697
-8784063 3253524
-796596 1060279