#include <bits/stdc++.h>
using namespace std;
int a[100001],b[100001];//原始数据
double s[100001];//前序和
struct node
{
int p;
double v;
inline bool operator < (node x)
{
return v<x.v;
}
}c[100001];//HASH
int HASH[100001];
int d[400001];//没错我就是树状数组!!
inline int read()
{
char ch=getchar();
int x=0;
while(!isdigit(ch))
ch=getchar();
while(isdigit(ch))
{
x=x*10+ch-'0';
ch=getchar();
}
return x;
}
int n,k;
inline int sum(int x)
{
int ans=0;
while(x)
{
ans+=d[x];
x-=(x&-x);
}
return ans;
}
inline void in(int x)
{
while(x<=n)
{
d[x]++;
x+=(x&-x);
}
}
bool judge(double x)
{
memset(d,0,sizeof(d));
int i,ans=0;
for(i=1;i<=n;i++)
{
s[i]=s[i-1]+(double)a[i]-(double)b[i]*x;
c[i].p=i,c[i].v=s[i];
}
sort(c+1,c+n+1);//HASH,将数转化为整数;
for(i=1;i<=n;i++)
{
HASH[c[i].p]=i;
if(c[i].v==c[i-1].v&&HASH[c[i-1].p]!=0)
HASH[c[i].p]=HASH[c[i-1].p];
}
for(i=1;i<=n;i++)//树状数组闪亮登场!!!!
{
ans+=sum(HASH[i]);
in(HASH[i]+1);
if(ans>=k+1)
return true;
}
return false;
}
int main()
{
int i;
double l=0,r=0,mid;
n=read(),k=read();
for(i=1;i<=n;i++)
a[i]=read();
for(i=1;i<=n;i++)
{
b[i]=read();
r=max(r,(double)a[i]/b[i]);
}
while(l<r&&r-l>0.003)
{
mid=(l+r)/2;
if(judge(mid)) l=mid;
else r=mid;
}
printf("%.2lf",l);
}