#include <bits/stdc++.h>
#pragma comment(linker, "/stack:336777216")
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using ui = unsigned int;
ll const mod = 1e9 + 7;
auto mt = mt19937(chrono::steady_clock::now().time_since_epoch().count());
bool works(ld x, int p, vector<pair<int, int>> &v) {
  ld charge_time = 0.0;
  for (auto &[dis, init] : v) {
    if ((ld)init >= x * dis) continue;
    charge_time += (x * dis - init) / (ld)p;
  }
  return charge_time <= x;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int n, p;
  cin >> n >> p;
  vector<pair<int, int>> v(n);
  ll total_out = 0;
  for (int i = 0; i < n; i++)
    cin >> v[i].first >> v[i].second, total_out += (ll)v[i].first;
  if (total_out <= p) return cout << -1 << '\n', 0;
  ld s = 0.0, e = 1e18, ans = 0.0;
  int turns = 120;
  while (turns--) {
    ld m = (s + e) / 2;
    if (works(m, p, v)) {
      ans = m;
      s = m;
    } else {
      e = m;
    }
  }
  cout << setprecision(8) << fixed << ans << '\n';
  return 0;
}
