func_code_string: #include <bits/stdc++.h>   using namespace std;   ;   const double eps = 1e-8;   const int mod = 1000000007;   const int maxn = 1e5 + 7;   const double pi = acos(-1);   const int inf = 0x3f3f3f3f;   const long long INF = 0x3f3f3f3f3f3f3f;   int n;   long long p;   struct node {     long long a, b;   } num[maxn];   bool check(double x) {     double ans = 0;     for (int i = 1; i <= n; i++) {       if (x * num[i].a - num[i].b > eps) {         ans += x * num[i].a - num[i].b;       }     }     return x * p - ans > eps;   }   int main() {     scanf( %d%lld , &n, &p);     long long sum = 0;     for (int i = 1; i <= n; i++) {       scanf( %lld%lld , &num[i].a, &num[i].b);       sum += num[i].a;     }     if (sum <= p) {       printf( -1 n );       return 0;     }     double ub = INF, lb = 0, mid;     for (int i = 0; i <= 100; i++) {       mid = (ub + lb) / 2;       if (check(mid))         lb = mid;       else         ub = mid;     }     printf( %.7f n , ub);     return 0;   }   