#include <bits/stdc++.h>
using namespace std;
#define double long double
signed main(){
int n, k;
cin >> n >> k;
vector<int> a(n);
for(int i = 0; i < n; i++){
cin >> a[i];
}
double l = 1, r = 1e7;
double ans = 0;
for(int i = 0; i < 60; i++){
double mid = (l + r) * 0.5;
int now = 0;
for(int j = 0; j < a.size(); j++){
now += a[j] / mid;
}
cout << now << endl;
if(now == k){
l = mid;
ans = max(ans, mid);
}
if(now > k){
l = mid;
}else{
r = mid;
}
}
cout << fixed << setprecision(15) << ans;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgZG91YmxlIGxvbmcgZG91YmxlCnNpZ25lZCBtYWluKCl7CglpbnQgbiwgazsKCWNpbiA+PiBuID4+IGs7Cgl2ZWN0b3I8aW50PiBhKG4pOwoJZm9yKGludCBpID0gMDsgaSA8IG47IGkrKyl7CgkJY2luID4+IGFbaV07Cgl9Cglkb3VibGUgbCA9IDEsIHIgPSAxZTc7Cglkb3VibGUgYW5zID0gMDsKCWZvcihpbnQgaSA9IDA7IGkgPCA2MDsgaSsrKXsKCQlkb3VibGUgbWlkID0gKGwgKyByKSAqIDAuNTsKCQlpbnQgbm93ID0gMDsgCgkJZm9yKGludCBqID0gMDsgaiA8IGEuc2l6ZSgpOyBqKyspewoJCQlub3cgKz0gYVtqXSAvIG1pZDsgCgkJfQoJCWNvdXQgPDwgbm93IDw8IGVuZGw7IAoJCWlmKG5vdyA9PSBrKXsKCQkJbCA9IG1pZDsKCQkJYW5zID0gbWF4KGFucywgbWlkKTsKCQl9CgkJaWYobm93ID4gayl7CgkJCWwgPSBtaWQ7CgkJfWVsc2V7CgkJCXIgPSBtaWQ7CgkJfQoJCQoJfQoJY291dCA8PCBmaXhlZCA8PCBzZXRwcmVjaXNpb24oMTUpIDw8IGFuczsKfQ==