#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.second < b.second;
else if (a.second != -1)return 1;
else if (b.second != -1)return 0;
return a.first < b.first;
}
void mnu(double &x, double y) {
if (y == -1)return;
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;
sort(all(a), cmp);
//for (auto i: a)cout << i.first << ' ' << i.second << nl;
double dp[n+1][n+1][n+1];
rep(i, 0, n+1)
rep(j, 0, n+1)
rep(p, 0, n+1)
dp[i][j][p] = -1;
dp[0][0][0] = 0;
double res = -1;
int bp = 0;
rep(i, 0, n)
if (a[i].second != -1)bp += 1;
rep(C, 0, min(bp, k)+1) {
rep(i, 0, n) {
rep(j, 0, min(i+1, k)+1) {
rep(c, 0, C+1) {
if (dp[i][j][c] == -1)continue;
mnu(dp[i+1][j][c], dp[i][j][c]);
if (j+1 <= k) {
mnu(dp[i+1][j+1][c], dp[i][j][c]+(double)a[i].first/double(C+1.0));
if(a[i].second != -1 && c < C)
mnu(dp[i+1][j+1][c+1], dp[i][j][c]+(double)a[i].second/(double)(c+1));
}
}
}
}
if (dp[n][k][C] != -1)mnu(res, dp[n][k][C]);
//cout << C << ": " << dp[n][k][C] << nl;
rep(i, 0, n+1)
rep(j, 0, min(k, i+1)+1)
rep(p, 0, C+1)dp[i][j][p] = -1;
dp[0][0][0] = 0;
}
cout << res << nl;
}
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
solve();
return 0;
}