#include <bits/stdc++.h>
using namespace std;
#pragma GCC Optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define repA(i, a, n) for(int i = a; i <= (n); ++i)
#define repD(i, a, n) for(int i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define fill(a) memset(a, 0, sizeof (a))
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
typedef long double ld;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ld, ld> pii;
typedef vector<int> vi;
map<ld,int> val;
struct FT {
vector<ll> s;
FT(int n) : s(n) {}
void update(int pos, ll dif) { // a[pos] += dif
for (; pos < sz(s); pos |= pos + 1) s[pos] += dif;
}
ll query(int pos) { // sum of values in [0, pos)
ll res = 0;
for (; pos > 0; pos &= pos - 1) res += s[pos-1];
return res;
}
int lower_bound(ll sum) {// min pos st sum of [0, pos] >= sum
// Returns n if no sum is >= sum, or -1 if empty sum is.
if (sum <= 0) return -1;
int pos = 0;
for (int pw = 1 << 25; pw; pw >>= 1) {
if (pos + pw <= sz(s) && s[pos + pw-1] < sum)
pos += pw, sum -= s[pos-1];
}
return pos;
}
};
struct FT2 {
vector<vi> ys; vector<FT> ft;
FT2(int limx) : ys(limx) {}
void fakeUpdate(int x, int y) {
for (; x < sz(ys); x |= x + 1) ys[x].push_back(y);
}
void init() {
trav(v, ys) sort(all(v)), ft.emplace_back(sz(v));
}
int ind(int x, int y) {
return (int)(lower_bound(all(ys[x]), y) - ys[x].begin()); }
void update(int x, int y, ll dif) {
for (; x < sz(ys); x |= x + 1)
ft[x].update(ind(x, y), dif);
}
ll query(int x, int y) {
ll sum = 0;
for (; x; x &= x - 1)
sum += ft[x-1].query(ind(x-1, y));
return sum;
}
};
map<ii,int> cc;
int main() {
cin.sync_with_stdio(0); cin.tie(0);
cin.exceptions(cin.failbit);
int n;ld w;cin>>n>>w;
vector<pii> itr;
set<ld> al;
rep(i,n){
ld x,v;cin>>x>>v;
itr.pb(mp(abs(x/(v-w)),abs(x/(v+w))));
al.insert(abs(x/(v-w)));al.insert(abs(x/(v+w)));
}
int cnt = 0;
trav(i,al){
cnt++;
val[i] = cnt;
}
ll ans = 0;
FT2 t(200009);
trav(i,itr){
t.fakeUpdate(val[i.fst],val[i.snd]);
}
t.init();
trav(i,itr){
ans+=t.query(200001,val[i.snd]+1)+t.query(val[i.fst]+1,200001)-t.query(val[i.fst],val[i.snd]+1)-t.query(val[i.fst]+1,val[i.snd])-cc[mp(val[i.fst],val[i.snd])];
t.update(val[i.fst],val[i.snd],1);
cc[mp(val[i.fst],val[i.snd])]++;
}
cout<<ans;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNwcmFnbWEgR0NDIE9wdGltaXplKCJPZmFzdCIpCiNkZWZpbmUgcmVwKGksIG4pICAgIGZvcihpbnQgaSA9IDA7IGkgPCAobik7ICsraSkKI2RlZmluZSByZXBBKGksIGEsIG4pICBmb3IoaW50IGkgPSBhOyBpIDw9IChuKTsgKytpKQojZGVmaW5lIHJlcEQoaSwgYSwgbikgIGZvcihpbnQgaSA9IGE7IGkgPj0gKG4pOyAtLWkpCiNkZWZpbmUgdHJhdihhLCB4KSBmb3IoYXV0byYgYSA6IHgpCiNkZWZpbmUgYWxsKHgpIHguYmVnaW4oKSwgeC5lbmQoKQojZGVmaW5lIHN6KHgpIChpbnQpKHgpLnNpemUoKQojZGVmaW5lIGZpbGwoYSkgIG1lbXNldChhLCAwLCBzaXplb2YgKGEpKQojZGVmaW5lIGZzdCBmaXJzdAojZGVmaW5lIHNuZCBzZWNvbmQKI2RlZmluZSBtcCBtYWtlX3BhaXIKI2RlZmluZSBwYiBwdXNoX2JhY2sKdHlwZWRlZiBsb25nIGRvdWJsZSBsZDsKdHlwZWRlZiBsb25nIGxvbmcgbGw7CnR5cGVkZWYgcGFpcjxpbnQsIGludD4gaWk7CnR5cGVkZWYgcGFpc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