#include <bits/stdc++.h>
using namespace std;
bool double_less(double a, double b, double e) {
  return abs(a - b) < e || a < b;
}
struct gadget {
  double power;
  double energy;
};
vector<gadget> g;
int n, p;
bool check(double time) {
  double rE = time * p;
  for (int i = 0; i < g.size(); i++) {
    double l = g[i].energy - g[i].power * time;
    if (rE + l < 10e-5) return false;
    if (l < 0) rE += l;
  }
  return true;
}
int main() {
  cin >> n >> p;
  double sEn = 0, sP = 0;
  for (int i = 0; i < n; i++) {
    double a, b;
    cin >> a >> b;
    sP += a;
    sEn += b;
    g.push_back(gadget{a, b});
  }
  if (p >= sP) {
    cout << "-1";
    return 0;
  }
  double l = 0, r = 10e9;
  while (r - l > 10e-6) {
    double mid = (l + r) / 2;
    if (check(mid)) {
      l = mid += 10e-6;
      continue;
    }
    r = mid;
  }
  cout << r;
  return 0;
}
