#include <bits/stdc++.h>
using namespace std;
int de[100005];
int ini[100005];
int main() {
  long long int n, p;
  cin >> n >> p;
  long long int sum = 0;
  long long int sum1 = 0;
  for (long long int i = 0; i < n; i++) {
    scanf("%d%d", &de[i], &ini[i]);
    sum = sum + de[i];
    sum1 = sum1 + ini[i];
  }
  if (sum <= p) {
    printf("-1\n");
    return 0;
  }
  double low = 0;
  double high = 1e10;
  double x;
  while (high - low > 0.0000001) {
    double mid = (low + high) / 2.0;
    double needed = 0;
    for (long long int i = 0; i < n; i++) {
      x = (mid * (de[i] * 1.0) - ini[i] * 1.0);
      if (x > 0) needed = needed + x;
    }
    if (needed > mid * (p * 1.0)) {
      high = mid;
    } else {
      low = mid;
    }
  }
  printf("%0.6lf\n", low);
  return 0;
}
