#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
struct node {
  int cost, time;
} a[N];
int main() {
  int n, add;
  long long sum = 0;
  scanf("%d %d", &n, &add);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &a[i].cost, &a[i].time);
    sum += a[i].cost;
  }
  if (sum <= add)
    printf("-1\n");
  else {
    double l = 0, r = 1e11;
    while (r - l > 1e-5) {
      double mid = (l + r) / 2;
      double k = 0;
      for (int i = 1; i <= n; i++) {
        if (a[i].cost * mid > a[i].time) {
          k += (a[i].cost * mid - a[i].time) / add;
        }
      }
      if (k > mid)
        r = mid;
      else
        l = mid;
    }
    printf("%f\n", r);
  }
  return 0;
}
