#include <bits/stdc++.h>
using namespace std;
long long n, a[100005], p, b[100005], og;
int main() {
  og = 0;
  scanf("%lld", &n), scanf("%lld", &p);
  for (int i = 0; i < n; i++)
    scanf("%lld", &a[i]), scanf("%lld", &b[i]), og += a[i];
  if (p >= og)
    printf("-1\n");
  else {
    double lo = 0, hi = 1e18, mid, ans = 0;
    while (hi - lo > 1e-9) {
      mid = lo + (hi - lo) / 2;
      double charge_time_req = 0;
      for (int i = 0; i < n; i++) {
        if (b[i] >= a[i] * mid) continue;
        charge_time_req += (a[i] * mid - b[i]) / p;
      }
      if (charge_time_req >= mid) {
        ans = mid;
        hi = mid;
      } else
        lo = mid;
    }
    printf("%.10lf\n", ans);
  }
  return 0;
}
