#include <bits/stdc++.h>
using namespace std;
vector<long double> need;
vector<pair<long double, long double>> arr;
bool check(long double mid, long double k) {
  long double total = 0, supply = mid * k;
  for (int i = 0; i < need.size(); ++i) {
    if ((mid - need[i]) * arr[i].first > 0)
      total += (mid - need[i]) * arr[i].first;
  }
  return supply >= total;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long double n, k, temp = 0;
  cin >> n >> k;
  arr.resize(n);
  need.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i].first >> arr[i].second;
    temp += arr[i].first;
    need[i] = arr[i].second / arr[i].first;
  }
  if (temp <= k) {
    cout << "-1";
  } else {
    long double s = 0, e = LONG_LONG_MAX, mid;
    for (int i = 0; i < 200; ++i) {
      mid = (e + s) / 2;
      if (check(mid, k))
        s = mid;
      else
        e = mid;
    }
    cout << fixed;
    cout << setprecision(10) << mid;
  }
}
