#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
const int inf = (1 << 30) - 1;
const int N = (int)1e6 + 5;
int n, m, k, w, x[N], v[N], cnt[N];
pair<int, int> val[N], a[N];
int first[N];
long long ans;
void add(int R) {
  while (R <= k) {
    first[R]++;
    R |= R + 1;
  }
}
int get(int R) {
  int res = 0;
  while (R >= 0) {
    res += first[R];
    R = (R & (R + 1)) - 1;
  }
  return res;
}
bool cmp(pair<int, int> a, pair<int, int> b) {
  return abs((long long)a.first * b.second) <
         abs((long long)a.second * b.first);
}
void solve() {
  for (int i = 0; i < k; i++) first[i] = 0;
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; i++) {
    int j = i;
    while (j + 1 <= n && a[j + 1] == a[i]) j++;
    for (int t = i; t <= j; t++) ans += get(k - 1) - get(a[t].second - 1);
    for (int t = i; t <= j; t++) add(a[t].second);
    i = j;
  }
}
int main() {
  scanf("%d %d", &n, &w);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", x + i, v + i);
    val[k++] = make_pair(x[i], v[i]);
    val[k++] = make_pair(x[i], v[i] - w);
    val[k++] = make_pair(x[i], v[i] + w);
  }
  sort(val, val + k, cmp);
  for (int i = 1; i <= n; i++) {
    a[i].first = lower_bound(val, val + k, make_pair(x[i], v[i]), cmp) - val;
    a[i].second =
        lower_bound(val, val + k, make_pair(x[i], v[i] + w), cmp) - val;
    cnt[a[i].first]++;
  }
  solve();
  for (int i = 1; i <= n; i++) {
    a[i].first = lower_bound(val, val + k, make_pair(x[i], v[i]), cmp) - val;
    a[i].second =
        lower_bound(val, val + k, make_pair(x[i], v[i] - w), cmp) - val;
  }
  solve();
  for (int i = 0; i < k; i++) {
    ans += (long long)cnt[i] * (cnt[i] - 1) / 2;
  }
  cout << ans << "\n";
  return 0;
}
