#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && (c != '-')) c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
const int N = 1e5 + 10;
int n, m, x[N], v[N], cnt;
double c[N << 1];
pair<double, double> b[N];
int t[N];
inline void Add(int x, int y) {
  for (; x <= cnt; x += x & -x) t[x] += y;
}
inline int Query(int x) {
  int ret = 0;
  for (; x; x -= x & -x) ret += t[x];
  return ret;
}
int main() {
  n = read(), m = read();
  for (register int i = (1); i <= (n); i++) {
    x[i] = read(), v[i] = read();
    c[++cnt] = 1.0 * x[i] / (m - v[i]);
    c[++cnt] = 1.0 * x[i] / (m + v[i]);
    b[i] = make_pair(c[cnt - 1], c[cnt]);
  }
  sort(c + 1, c + 1 + cnt), cnt = unique(c + 1, c + 1 + cnt) - c - 1;
  for (register int i = (1); i <= (n); i++) {
    b[i].first = lower_bound(c + 1, c + 1 + cnt, b[i].first) - c;
    b[i].second = lower_bound(c + 1, c + 1 + cnt, b[i].second) - c;
  }
  sort(b + 1, b + 1 + n);
  long long ans = 0;
  for (register int i = (1); i <= (n); i++)
    ans += Query(b[i].second), Add(b[i].second, 1);
  printf("%lld\n", ans);
}
