func_code_string: #include <bits/stdc++.h>   double eps = 1e-6;   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     int n;     long long p, a[100010], b[100010];     long long sum = 0;     cin >> n >> p;     for (int i = 0; i < n; ++i) {       cin >> a[i] >> b[i];       sum += a[i];     }     if (p >= sum) {       cout << -1 << endl;       return 0;     }     double lo = 0;     double hi = 1e17;     double mx = 0;     for (int var = 0; var < 100; ++var) {       mx = lo + (hi - lo) / 2;       double need = 0;       for (int i = 0; i < n; ++i) {         need += max(mx * a[i] - b[i], 0 * 1.0);       }       if (p * mx >= need) {         lo = mx + eps;       } else {         hi = mx - eps;       }     }     printf( %.9f n , lo);     return 0;   }   