#include <bits/stdc++.h>   using namespace std;   int n, p;   long double intial[100009], usage[100009];   bool solve(long double x) {     long double pp = p * x;     for (int i = 0; i < n; i++) {       pp -= max(x * usage[i] - intial[i], (long double)0);       if (pp < -1e-10) return false;     }     return true;   }   int main() {     cin >> n >> p;     for (int i = 0; i < n; i++) cin >> usage[i] >> intial[i];     long double low = 0, high = 1e19, m;     for (int i = 0; i < 200; i++) {       m = (low + high) / 2;       if (solve(m))         low = m;       else         high = m;     }     if (low > 1e18 + 20) return cout << -1, 0;     cout << setprecision(6) << fixed << low;     return 0;   }   