#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ld = long double;

#define all(x)  x.begin(),x.end()
#define v(x) vector<x>
#define nl '\n'
#define fxd(x) fixed << setprecision(x)
template<class t> using ordered_set = tree<t, null_type, less<t>, rb_tree_tag, tree_order_statistics_node_update>;
template<class t> using ordered_multiset = tree<t, null_type, less_equal<t>, rb_tree_tag, tree_order_statistics_node_update>;

vector<pair<ll,ll>> pr; 
ll n , k ; 

bool can(double x)
{
    sort(all(pr),[&](pair<ll,ll> fr , pair<ll,ll> sc){
        return ((double)fr.first - x * (double)fr.second) > ((double)sc.first - x * (double)sc.second);
    });
    double sum = 0;
    for (int i = 0; i < k; i++)
    {
        sum+= (double)pr[i].first - x*(double)pr[i].second;
    }
    return sum >= 0;
}
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    cin >> n >> k;
    pr.resize(n);
    for (int i = 0; i < n; i++)
    {
        cin >> pr[i].first;
        cin >> pr[i].second;
    }

    double l = 0,r = 1e10,pos = -1,mid;

    for (int i = 0; i < 70; i++)
    {
        mid = (l + r)/2;
        if(can(mid))
        {
            pos = mid;
            l = mid;
        }
        else
        {
            r = mid;
        }
    }
    
    cout << fxd(10) <<pos;
    
}