#include <cstdio>
#include <algorithm>
#include <functional>
#include <numeric>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

/**
 * (sum a_i) / (sum b_i) ---> max
 */

const int N = 1e5;

int n, k, a[N], b[N];
double c[N];
bool solve( double x ) {
  forn(i, n)
    c[i] = a[i] - x * b[i];
  nth_element(c, c + k, c + n, greater<double>());
  return accumulate(c, c + k, 0.0) >= 0;
}
int main() {
  scanf("%d%d", &n, &k);
  forn(i, n)
    scanf("%d%d", &a[i], &b[i]);

  double L = -1e10, R = 1e10; // 10^{10} --> 10^{-15}
  forn(_, 90) { // 10^{25} <= 10^{27} ~= 2^{90}
    double x = (L + R) / 2;
    (solve(x) ? L : R) = x;
  }
  printf("%.10f\n", L); // answer
}