772_A. Voltage Keepsake
You have n devices that you want to use simultaneously.

The i-th device uses ai units of power per second. This usage is continuous. That is, in λ seconds, the device will use λ·ai units of power. The i-th device currently has bi units of power stored. All devices can store an arbitrary amount of power.

You have a single charger that can plug to any single device. The charger will add p units of power per second to a device. This charging is continuous. That is, if you plug in a device for λ seconds, it will gain λ·p units of power. You can switch which device is charging at any arbitrary unit of time (including real numbers), and the time it takes to switch is negligible.

You are wondering, what is the maximum amount of time you can use the devices until one of them hits 0 units of power.

If you can use the devices indefinitely, print -1. Otherwise, print the maximum amount of time before any one device hits 0 power.

Input

The first line contains two integers, n and p (1 ≤ n ≤ 100 000, 1 ≤ p ≤ 109) — the number of devices and the power of the charger.

This is followed by n lines which contain two integers each. Line i contains the integers ai and bi (1 ≤ ai, bi ≤ 100 000) — the power of the device and the amount of power stored in the device in the beginning.

Output

If you can use the devices indefinitely, print -1. Otherwise, print the maximum amount of time before any one device hits 0 power.

Your answer will be considered correct if its absolute or relative error does not exceed 10 - 4.

Namely, let's assume that your answer is a and the answer of the jury is b. The checker program will consider your answer correct if <image>.

Examples

Input

2 1
2 2
2 1000


Output

2.0000000000

Input

1 100
1 1


Output

-1


Input

3 5
4 3
5 2
6 1


Output

0.5000000000

Note

In sample test 1, you can charge the first device for the entire time until it hits zero power. The second device has enough power to last this time without being charged.

In sample test 2, you can use the device indefinitely.

In sample test 3, we can charge the third device for 2 / 5 of a second, then switch to charge the second device for a 1 / 10 of a second.
```python
#!/usr/bin/env python3
from sys import stdin,stdout
from decimal import *


def ri():
    return map(int, input().split())


getcontext().prec = 100
n, p = ri()
p = Decimal(p)
a = [Decimal(0) for i in range(n)]
b = [Decimal(0) for i in range(n)]
ab = [[Decimal(0), Decimal(0)] for i in range(n)]
A = [Decimal(0) for i in range(n)]
B = [Decimal(0) for i in range(n)]
for i in range(n):
    aa, bb = ri()
    ab[i][0] = Decimal(aa)
    ab[i][1] = Decimal(bb)
ab.sort(key=lambda e: e[1]/e[0])
for i in range(n):
    a[i] = Decimal(ab[i][0])
    b[i] = Decimal(ab[i][1])

if p >= sum(a):
    print(-1)
    exit()

A[0] = Decimal(0)
B[0] = Decimal(1)
for i in range(1, n):
    A[i] = a[i] - b[i]*a[i-1]/b[i-1] + b[i]*A[i-1]/b[i-1]
    B[i] = b[i]*B[i-1]/b[i-1]


sigmaA = Decimal(0)
sigmaB = Decimal(0)
for i in range(0, n):
    sigmaA += A[i]
    sigmaB += B[i]
    p0 = Decimal(p-sigmaA)/Decimal(sigmaB)
    if Decimal(a[0]-p0) <= 0:
        continue
    t = Decimal(b[0])/Decimal(a[0]-p0)
    #print(p0, t, sigmaA, sigmaB)
    if i != n-1 and t <= Decimal(b[i+1]/a[i+1]) and t > 0:
        print(t)
        exit()

print(t)



```