#include <bits/stdc++.h>
using namespace std;
long long int a[(long long int)1e5 + 1000];
long long int b[(long long int)1e5 + 1000];
long long int n;
long long int p;
bool check(double mid) {
  double ret = 0.0;
  for (int i = 1; i <= n; i += 1) {
    double timetakentodischarge = (double)((double)b[i] * 1.0 / a[i] * 1.0);
    if (timetakentodischarge >= mid) {
      continue;
    }
    double batterytillmid = (double)(a[i] * mid);
    double curr = (double)b[i] * 1.0;
    double needed = (double)(batterytillmid - curr) / (p * 1.0);
    ret += needed;
    ret *= 1.0;
  }
  return ret <= mid;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> p;
  for (int i = 1; i <= n; i += 1) {
    cin >> a[i] >> b[i];
  }
  long long int maxhere = 0;
  for (int i = 1; i <= n; i += 1) {
    maxhere = max(maxhere, a[i]);
  }
  long long int iterations = 0;
  double high = (double)1e18;
  double low = 0;
  double ans = 0;
  while (high >= low) {
    iterations += 1;
    if (iterations >= (long long int)1e3) {
      cout << "-1" << endl;
      return 0;
    }
    double mid = (high + low) / 2.0;
    if (check(mid)) {
      low = mid + 1e-6;
      ans = max(ans, mid);
    } else {
      high = mid - 1e-6;
    }
  }
  printf("%.5lf\n", ans);
  return 0;
}
