#include <bits/stdc++.h>
using namespace std;
long double ara[100005], b[100005], p;
int n;
long double b_search() {
  long double lo = 0.0, hi = 1000000000000000000.0, mid, ans;
  int cnt = 100;
  while (cnt--) {
    mid = (hi + lo) / 2.0;
    long double sum = 0.0;
    for (int i = 0; i < n; i++) {
      long double x = mid * ara[i];
      if (x > b[i]) sum = sum + (x - b[i]);
    }
    if (sum > (p * mid))
      hi = mid;
    else {
      ans = mid;
      lo = mid;
    }
  }
  return ans;
}
int main() {
  long double x;
  while (cin >> n >> p) {
    x = 0.0;
    for (int i = 0; i < n; i++) cin >> ara[i] >> b[i], x += ara[i];
    if (p >= x)
      cout << -1 << endl;
    else
      cout << setprecision(7) << fixed << b_search() << endl;
  }
  return 0;
}
