#include <bits/stdc++.h>
using namespace std;
int n;
pair<double, double> ar[100010];
double p;
int chk(double x) {
  double a, b, c, d = x * p;
  for (int i = 0; i <= n - 1; i++) {
    a = (x * ar[i].first) - ar[i].second;
    if (a > 0) d -= a;
  }
  if (d < 0)
    return 0;
  else
    return 1;
}
int main() {
  ios::sync_with_stdio(false);
  long long i, j, x, y;
  double a = 0, b, c = 0, d, st, en, mid;
  cin >> n >> p;
  for (int i = 0; i <= n - 1; i++)
    cin >> ar[i].first >> ar[i].second, c += ar[i].first;
  st = 0;
  en = (long long)1000000000000000000;
  for (int i = 0; i <= 100; i++) {
    mid = (st + en) / 2;
    x = chk(mid);
    if (x == 0)
      en = mid;
    else
      st = mid, a = max(a, mid);
  }
  if (c <= p) {
    cout << -1 << '\n';
    return 0;
  }
  cout << fixed;
  cout << setprecision(9) << a << '\n';
  return 0;
}
