#include <stdio.h>
#include <cstring>
#include <iostream>
#include <algorithm>
#define maxn 100005
using namespace std;
int a[maxn],b[maxn];
double t[maxn];
int n,k;
double s[maxn];
int t2[maxn];
int c[maxn];
inline int lowbit(int x) { return x&(-x);}
inline int sum(int x){int ret = 0;while(x>0){ret+=c[x];x-=lowbit(x);}return ret;}
inline int inc(int x){while(x<(n+5)){c[x]++;x+=lowbit(x);}}
struct pp{
int pos;
double val;
}pps[maxn];
bool operator<(pp &p1,pp &p2){
return p1.val<p2.val;
}
int check(double p){
memset(c,0,sizeof(c));
for(int i = 1;i<=n;i++){
s[i+1] = s[i]+(1.0*a[i]-1.0*p*b[i]);
}
for(int i = 1;i<=n+1;i++){
pps[i].val = s[i];
pps[i].pos = i;
}
// 1 2 3 4 5 6 7 ```` (n+1)
sort(pps+1,pps+2+n);
for(int i = 1;i<=n+1;i++){
t2[pps[i].pos] = i;
}
int aans = 0;
for(int i = 1;i<=n+1;i++){
aans+=sum(t2[i]);
inc(t2[i]);
}
return aans;
}
int main(){
scanf("%d%d",&n,&k);
for(int i = 1;i<=n;i++) scanf("%d",a+i);
for(int i = 1;i<=n;i++) scanf("%d",b+i);
for(int i = 1;i<=n;i++) t[i] = 1.0*a[i]/b[i];
sort(t+1,t+n+1);
double ans = t[n];
double l = 0,r = ans;
while(l<r&&r-l>0.003){
double mid = (l+r)/2.0;
int ck = check(mid);
if(ck>=k){
l = mid;
}else{
r = mid;
}
}
printf("%.2f",l);
return 0;
}