#include <bits/stdc++.h>
using namespace std;
const double inf = 1e12;
const double inf2 = 9e11;
const int M = 1e5 + 5;
const double eps = 1e-4;
double a[M];
double b[M];
int main() {
  int n, p;
  cin >> n >> p;
  double suma = 0, sumb = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lf", &a[i]);
    suma += a[i];
    scanf("%lf", &b[i]);
    sumb += b[i];
  }
  double t1, t2;
  t1 = 0, t2 = inf;
  while (t2 - t1 >= eps) {
    double mid = (t2 + t1) / 2;
    double csm = 0;
    for (int i = 0; i < n; i++) {
      csm += max(0.0, mid * a[i] - b[i]);
    }
    if (csm / mid < p) {
      t1 = mid;
    } else
      t2 = mid;
  }
  if (t2 < inf2)
    cout << t2;
  else
    cout << -1;
}
