#include <bits/stdc++.h>
using namespace std;
int d[100005][2];
bool valid(double t, int n, int p) {
  double pneeded = 0;
  double phave = t * p;
  for (int i = 0; i < n; i++) {
    pneeded += max(0.0, d[i][0] * t - d[i][1]);
  }
  if (pneeded < phave) return true;
  return false;
}
int main(void) {
  int n, p;
  scanf("%d %d", &n, &p);
  long long tp = 0, initp = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &d[i][0], &d[i][1]);
    tp += d[i][0];
    initp += d[i][1];
  }
  if (tp <= p) {
    printf("-1\n");
    return 0;
  }
  double l = 0, r = ((double)initp) / (tp - p) + 10, mid;
  while (r - l > .00001) {
    mid = (r + l) / 2;
    if (valid(mid, n, p))
      l = mid;
    else
      r = mid;
  }
  cout << mid << endl;
  return 0;
}
