#include <bits/stdc++.h>
using namespace std;
int Q, N, M, K, L;
struct BIT {
  int* bit;
  int n;
  void init(int _n) {
    bit = (int*)calloc(_n, sizeof(int));
    n = _n;
  }
  void update(int i, int v) {
    for (; i < n; i |= (i + 1)) bit[i] += v;
  }
  int query(int r) {
    int ret = 0;
    for (; r >= 0; r = (r & (r + 1)) - 1) ret += bit[r];
    return ret;
  }
  int query(int l, int r) { return query(r) - query(l - 1); }
};
struct Fraction {
  long long num, deno;
  Fraction(long long num, long long deno) : num(num), deno(deno) {
    if (deno < 0) this->num *= -1, this->deno *= -1;
  }
  bool operator<(const Fraction& rhs) const {
    return num * rhs.deno < deno * rhs.num;
  }
  bool operator!=(const Fraction& rhs) const {
    return num * rhs.deno != deno * rhs.num;
  }
};
vector<pair<Fraction, Fraction> > A;
vector<pair<Fraction, int> > B;
vector<int> C;
map<Fraction, int> MAP;
void __solve() {
  cin >> N >> M;
  BIT bit;
  bit.init(N + 5);
  for (int i = 0; i < N; i++) {
    long long a, b;
    cin >> a >> b;
    A.push_back({Fraction{-a, b - M}, Fraction{-a, b + M}});
  }
  for (int i = 0; i < N; i++) A[i].second.num *= -1;
  std::sort(A.begin(), A.end());
  for (int i = 0; i < N; ++i) A[i].second.num *= -1;
  for (int i = 0; i < N; ++i) B.push_back({A[i].second, i});
  std::sort(B.begin(), B.end());
  C.resize(N, 0);
  for (int i = 0, rk = -1; i < N; ++i) {
    if (i == 0 || B[i].first != B[i - 1].first) ++rk;
    C[B[i].second] = rk;
  }
  long long ret = 0;
  for (int i = 0; i < N; ++i) {
    ret += bit.query(C[i], N - 1);
    bit.update(C[i], 1);
  }
  cout << ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  __solve();
  cin >> N;
}
