#include <bits/stdc++.h>
using namespace std;
double f(double rate[], double ini[], int n, double t) {
  double res = 0;
  for (int i = 0; i < n; i++) {
    double z = ini[i] - rate[i] * t;
    if (z < 0) res += abs(z);
  }
  return res;
}
int main() {
  int n;
  scanf("%d", &n);
  double p;
  scanf("%lf", &p);
  double rate[n], ini[n];
  double sumrate = 0, sumini = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &rate[i], &ini[i]);
    sumrate += rate[i];
    sumini += ini[i];
  }
  if (sumrate == p) {
    cout << -1;
    return 0;
  } else if (sumini / ((sumrate - p) * (1.0)) < 0) {
    cout << -1;
    return 0;
  }
  double low = 0;
  double high = 1e19;
  int cnt = 0;
  double ans = 0;
  while (1) {
    double mid = (low + high) / (2.0);
    double ava = p * mid;
    double ghatti = f(rate, ini, n, mid);
    ans = mid;
    if (ghatti > ava)
      high = mid;
    else
      low = mid;
    cnt++;
    if (cnt == 1000) break;
  }
  printf("%.8lf", ans);
}
