#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long INFll = 1e18;
const double EPS = 1e-7;
bool check(long double mid, vector<pair<int, int> >& ev, int p, int n) {
  long double bad = 0;
  for (int i = 0; i < (int((ev).size())); ++i) {
    long double cur = ev[i].second - ev[i].first * mid;
    if (cur < 0) bad += abs(ev[i].second - ev[i].first * mid) / p;
  }
  return bad <= mid;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, p;
  cin >> n >> p;
  vector<pair<int, int> > ev;
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    ev.push_back(make_pair(a, b));
  }
  double cur_time = 0;
  long double l = 0, r = 1e18;
  long double mid;
  int temp = 300;
  while (temp--) {
    mid = (l + r) / 2;
    if (check(mid, ev, p, n))
      l = mid;
    else
      r = mid;
  }
  cout << fixed;
  cout << setprecision(10);
  if (l >= (long double)1e17) {
    cout << -1;
    return 0;
  }
  cout << (l + r) / 2;
  return 0;
}
