#include <bits/stdc++.h>
#pragma GCC optimization("O3")
using namespace std;
const long long inf = INT_MAX;
const long long inf2 = 1e18;
const long long minf = -1 * 1e9;
const long long MAX = 1e5 + 5;
const long long MOD = 1e9 + 7;
const double pi = acos(-1.0);
const double EPS = 1e-9;
void init(int precision) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(precision);
}
inline void iofile() { freopen("input.txt", "r", stdin); }
double a, b, lis, ans, tot;
pair<double, double> arr[MAX];
int n, accu = 500;
bool cek(double x) {
  ans = 0.0;
  for (long long i = 1; i <= n; i++) {
    if (arr[i].first * x < arr[i].second) continue;
    ans += arr[i].first * x - arr[i].second;
  }
  return (ans < x * lis ? true : false);
}
double _binser() {
  double l = ans = 0.0;
  double r = inf2 * 1.0;
  double m, ans;
  while (accu--) {
    m = (l + r) / 2.0;
    if (cek(m))
      l = ans = m;
    else
      r = m;
  }
  return ans;
}
int main() {
  init(10);
  cin >> n >> lis;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i].first >> arr[i].second;
    tot += arr[i].first;
  }
  ans = _binser();
  if (lis >= tot) return cout << -1 << '\n', 0;
  cout << ans << '\n';
}
