#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
using P = pair<int, int>;
#define all(x) x.begin(), x.end()
#define rep(x,s,e) for (auto x=(s)-((s)>(e));x!=(e)-((s)>(e));((s)<(e)?x++:x--))
#define sz(x) (int)x.size()
const char nl = '\n';
const int mod = 998244353;
bool cmp(P a, P b) {
if (a.second != -1 && b.second != -1)return a.first < b.first;
else if (a.second != -1)return 0;
else if (b.second != -1)return 1;
return a.first < b.first;
}
void mnu(double &x, double y) {
if (x ==-1 || y < x)x = y;
}
void solve() {
int n, k; cin >> n >> k;
vector<P> a(n);
for (auto &i: a)cin >> i.first >> i.second;
vector<vector<double>> dp((1<<n), vector<double> (n+1, -1));
double res = -1;
dp[0][0] = 0;
rep(mask, 0, (1<<n)) {
rep(cnt, 0, __builtin_popcount(mask)+1) {
if (dp[mask][cnt] == -1)break;
rep(i, 0, n) {
if ((mask&(1<<i)))continue;
double sm = dp[mask][cnt];
mnu(dp[mask|(1<<i)][cnt], sm+(double)a[i].first/(double)(cnt+1));
if (a[i].second != -1)
mnu(dp[mask|(1<<i)][cnt+1], sm+(double)a[i].second/(double)(cnt+1));
}
if (__builtin_popcount(mask) == k)mnu(res, dp[mask][cnt]);
}
}
cout << res << nl;
}
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
solve();
return 0;
}