#include <bits/stdc++.h>
using namespace std;
int n, p;
long long sum;
int a[100000], b[100000];
double End[100000];
int main() {
  scanf("%d %d", &n, &p);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i], &b[i]);
    sum += a[i];
    End[i] = (double)b[i] / a[i];
  }
  if (p >= sum) {
    printf("-1\n");
    return 0;
  }
  double timeMin = 0, timeMax = 2000000000LL * 200000;
  while (timeMin < timeMax) {
    double timeMid = (timeMin + timeMax + 1e-6) / 2;
    double P = 0;
    for (int i = 0; i < n; i++)
      if (End[i] < timeMid) {
        P += a[i] - b[i] / timeMid;
      }
    if (P > p)
      timeMax = timeMid - 1e-6;
    else
      timeMin = timeMid;
  }
  printf("%1.5lf\n", timeMin);
  return 0;
}
