#include <bits/stdc++.h>
using namespace std;
int n, p, a[100005], b[100005];
bool ok(double x) {
  double t = 0;
  for (int i = 0; i < n; i++) {
    if (b[i] < a[i] * x) {
      t += (a[i] * x - b[i]) / p;
    }
  }
  return (t <= x);
}
int main() {
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  double low = 0, high = 1e18, mid;
  if (ok(high)) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < 100; i++) {
    mid = (low + high) / 2;
    if (ok(mid))
      low = mid;
    else
      high = mid;
  }
  cout << fixed << setprecision(10) << low;
  return 0;
}
