#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
float eps = 1e-4;
int a[N], b[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, p;
  cin >> n >> p;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    sum += a[i];
  }
  if (p >= sum) {
    cout << -1;
    return 0;
  }
  long double s = 0, e = 1e12;
  while (abs(s - e) >= eps) {
    double sum = 0;
    double mid = (s + e) / 2.0;
    for (int i = 1; i <= n; i++) {
      sum += max(0.0, mid * a[i] - b[i]);
    }
    if (sum > p * mid)
      e = mid;
    else
      s = mid;
  }
  cout << setprecision(10) << s;
  return 0;
}
