func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, p, su;   long long a[100005], b[100005];   long double ex[100005];   bool check(long double mid) {     long double need = 0;     for (int i = 0; i < n; i++) {       long double ne = max(0.0L, a[i] * (mid - ex[i]));       need += ne;     }     return (mid * p >= need);   }   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> n >> p;     for (int i = 0; i < n; i++) {       cin >> a[i] >> b[i];       su += a[i];     }     if (p >= su) {       cout << -1;     } else {       for (int i = 0; i < n; i++) {         ex[i] = (b[i] * 1.0L) / a[i];       }       long double l = 0;       long double r = 1e18;       for (int i = 0; i < 120; i++) {         long double mid = (l + r) / 2;         if (check(mid)) {           l = mid;         } else {           r = mid;         }       }       if (r > 1e18 - 100) {         cout << -1;       } else {         cout << setprecision(9) << l;       }     }     return 0;   }   