human
Write me a the Python program you requested given the following:
Arkady the air traffic controller is now working with n planes in the air. All planes move along a straight coordinate axis with Arkady's station being at point 0 on it. The i-th plane, small enough to be represented by a point, currently has a coordinate of xi and is moving with speed vi. It's guaranteed that xi·vi < 0, i.e., all planes are moving towards the station.

Occasionally, the planes are affected by winds. With a wind of speed vwind (not necessarily positive or integral), the speed of the i-th plane becomes vi + vwind.

According to weather report, the current wind has a steady speed falling inside the range [ - w, w] (inclusive), but the exact value cannot be measured accurately since this value is rather small — smaller than the absolute value of speed of any plane.

Each plane should contact Arkady at the exact moment it passes above his station. And you are to help Arkady count the number of pairs of planes (i, j) (i < j) there are such that there is a possible value of wind speed, under which planes i and j contact Arkady at the same moment. This value needn't be the same across different pairs.

The wind speed is the same for all planes. You may assume that the wind has a steady speed and lasts arbitrarily long.

Input

The first line contains two integers n and w (1 ≤ n ≤ 100 000, 0 ≤ w < 105) — the number of planes and the maximum wind speed.

The i-th of the next n lines contains two integers xi and vi (1 ≤ |xi| ≤ 105, w + 1 ≤ |vi| ≤ 105, xi·vi < 0) — the initial position and speed of the i-th plane.

Planes are pairwise distinct, that is, no pair of (i, j) (i < j) exists such that both xi = xj and vi = vj.

Output

Output a single integer — the number of unordered pairs of planes that can contact Arkady at the same moment.

Examples

Input

5 1
-3 2
-3 3
-1 2
1 -3
3 -5

Output

3

Input

6 1
-3 2
-2 2
-1 2
1 -2
2 -2
3 -2

Output

9

Note

In the first example, the following 3 pairs of planes satisfy the requirements: 

  * (2, 5) passes the station at time 3 / 4 with vwind = 1.

  *...
assistant
#Here is the Python program you requested.

import sys
range = xrange
input = raw_input

inp = [int(x) for x in sys.stdin.read().split()]; ii = 0

n = inp[ii]; ii += 1
w = inp[ii]; ii += 1

X = inp[ii + 0: ii + 2 * n: 2]
V = inp[ii + 1: ii + 2 * n: 2]
V = [-v for v in V]
ii += 2 * n

def sign(x):
    return 1 - 2*(x < 0)

def cmp1(i,j):
    # X[i] / (V[i] - w) < X[j] / (V[j] - w)
    a = X[i]
    b = V[i] - w

    c = X[j]
    d = V[j] - w

    x = sign(b) * a * abs(d)
    y = sign(d) * c * abs(b)

    return -(x < y or (x == y and 1.0 / b < 1.0 / d))

def cmp2(i,j):
    # X[i] / (V[i] + w) < X[j] / (V[j] + w)
    a = X[i]
    b = V[i] + w

    c = X[j]
    d = V[j] + w

    x = sign(b) * a * abs(d)
    y = sign(d) * c * abs(b)

    return -(x < y or (x == y and 1.0 / b > 1.0 / d))

order1 = sorted(range(n), cmp = cmp1)
order2 = sorted(range(n), cmp = cmp2)

def invert_count(A, B):
    mapper = [0]*n
    for i in range(n):
        mapper[A[i]] = i

    order = [mapper[i] for i in B]
    
    class segtree:
        def __init__(self, n):
            m = 1
            while m < n: m*=2
            self.m = m
            self.data = [0]*(2*m)
        def add(self, i):
            i += self.m
            while i:
                self.data[i] += 1
                i >>= 1
        def summer(self, l, r):
            l += self.m
            r += self.m

            s = 0
            while l < r:
                if l & 1:
                    s += self.data[l]
                    l += 1
                if r & 1:
                    r -= 1
                    s += self.data[r]
                l >>= 1
                r >>= 1
            return s

    seg = segtree(n)
    s = 0
    for i in reversed(order):
        s += seg.summer(0, i)
        seg.add(i)
    return s

print invert_count(order1, order2)