#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
typedef long double ld;
const int maxn=310;
const ld eps=1e-10;
int n,m,h,t;
int q[maxn];
ld ans;
struct point
{
ld x,y;
point (){}
point (ld a,ld b){x=a,y=b;}
point operator + (const point &a) const {return point(x+a.x,y+a.y);}
point operator - (const point &a) const {return point(x-a.x,y-a.y);}
ld operator * (const point &a) const {return x*a.y-y*a.x;}
point operator * (const ld &a) const {return point(x*a,y*a);}
}v[maxn],p[maxn];
struct line
{
point p,v;
ld a;
line() {}
line(point x,point y) {p=x,v=y,a=atan2(v.y,v.x);}
}l[maxn];
point getp(line l1,line l2)
{
point u=l1.p-l2.p;
ld temp=(l2.v*u)/(l1.v*l2.v);
return l1.p+l1.v*temp;
}
bool onlft(line a,point b)
{
return a.v*(b-a.p)>eps;
}
bool cmpl(line a,line b)
{
if(fabs(a.a-b.a)<eps) return onlft(a,b.p);
return a.a<b.a;
}
bool cmpp(point a,point b)
{
return a.x<b.x;
}
void HPI()
{
sort(l+1,l+n+3,cmpl);
int i,cnt=0;
for(i=2,cnt=1;i<=n+2;i++) if(fabs(l[i].a-l[cnt].a)>eps) l[++cnt]=l[i];
h=t=q[1]=1;
for(i=2;i<=cnt;i++)
{
while(h<t&&onlft(l[i],getp(l[q[t]],l[q[t-1]]))) t--;
while(h<t&&onlft(l[i],getp(l[q[h]],l[q[h+1]]))) h++;
q[++t]=i;
}
while(h<t&&onlft(l[q[h]],getp(l[q[t]],l[q[t-1]]))) t--;
while(h<t&&onlft(l[q[t]],getp(l[q[h]],l[q[h+1]]))) h++;
q[++t]=q[h];
for(i=h;i<t;i++) p[++m]=getp(l[q[i]],l[q[i+1]]);
sort(p+1,p+m+1,cmpp);
}
void calc(point x,point a,point b)
{
point c;
if(fabs(x.x-a.x)<eps) c=a;
else c=a+(b-a)*((x.x-a.x)/(b.x-a.x));
ld dis=fabs(c.y-x.y);
ans=min(ans,dis);
}
inline int rd()
{
int ret=0,f=1; char gc=getchar();
while(gc<‘0‘||gc>‘9‘) {if(gc==‘-‘)f=-f; gc=getchar();}
while(gc>=‘0‘&&gc<=‘9‘) ret=ret*10+gc-‘0‘,gc=getchar();
return ret*f;
}
int main()
{
n=rd();
int i,j;
for(i=1;i<=n;i++) v[i].x=rd();
for(i=1;i<=n;i++) v[i].y=rd();
for(i=1;i<n;i++) l[i]=line(v[i+1],v[i]-v[i+1]);
l[n].p=point(0,1e25),l[n].v=point(1e7,1);
l[n+1].p=point(-1,0),l[n+1].v=point(1,1e25);
l[n+2].p=point(1e7,1e25),l[n+2].v=point(-1e25,-2);
HPI(),ans=1e25;
for(i=1,j=2;i<=n;i++)
{
for(;p[j].x<v[i].x;j++)
calc(p[j],v[i-1],v[i]);
if(j>2)
calc(v[i],p[j-1],p[j]);
}
printf("%.3Lf",ans);
return 0;
}