#include <bits/stdc++.h>
using namespace std;
long long arr[100100], n, ans, temp, p, a, b;
pair<long long, long long> pa[100100];
bool check(long double num) {
  long double ans1 = 0;
  for (int i = 0; i < n; i++)
    ans1 += max((long double)0, (num * pa[i].first - pa[i].second) / p);
  if (ans1 <= num)
    return true;
  else
    return false;
}
int main() {
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    pa[i].first = a;
    pa[i].second = b;
  }
  long double st = 0, en = 2000000000000;
  for (int i = 0; i < 200; i++) {
    long double mid = (st + en) / 2;
    if (check(mid))
      st = mid;
    else
      en = mid;
  }
  if (en > 1e11)
    cout << "-1" << endl;
  else {
    cout.precision(6);
    cout << fixed << st;
  }
  return 0;
}
