#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
int arr[N];
int arr2[N];
double p, a, b;
int n;
long long sum;
double binser(double l, double r) {
  double ans = 0;
  for (int i = 0; i < 100; ++i) {
    double mid = (l + r) / 2;
    double res = 0;
    for (int i = 1; i <= n; i++) {
      if (arr[i] * mid > arr2[i]) {
        res += arr[i] * mid - arr2[i];
      }
    }
    if (res <= p * mid) {
      ans = mid;
      l = mid;
    } else {
      r = mid;
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> p;
  sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a >> b;
    arr[i] = a;
    arr2[i] = b;
    sum += a;
  }
  if (sum <= p) {
    cout << -1 << endl;
    return 0;
  }
  cout << fixed << setprecision(10) << binser(0, 1e18) << endl;
}
