#include <bits/stdc++.h>
using namespace std;
int n, w;
int ft[100003];
vector<pair<int, int> > ans1, ans2;
vector<pair<int, int> > vec_neg, vec_pos;
vector<pair<int, int> > pos_fst, pos_slw;
vector<pair<int, int> > pfst, nfst, pslw, nslw;
void update(int x, int val) {
  while (x <= n) {
    ft[x] += val;
    x += x & (-x);
  }
}
int query(int x) {
  int res = 0;
  while (x) {
    res += ft[x];
    x -= x & (-x);
  }
  return res;
}
int query(int x, int y) { return query(y) - query(x - 1); }
long long fpb(long long a, long long b) { return (b == 0) ? a : fpb(b, a % b); }
long long kpk(long long a, long long b) { return a / fpb(a, b) * b; }
bool faster(pair<int, int> i1, pair<int, int> i2) {
  long long a = abs(i1.first), b = i1.second, c = abs(i2.first), d = i2.second;
  return (1.0 * a) / (1.0 * b) < (1.0 * c) / (1.0 * d);
}
bool slower(pair<int, int> i1, pair<int, int> i2) {
  long long a = abs(i1.first), b = i1.second, c = abs(i2.first), d = i2.second;
  return (1.0 * a) / (1.0 * b) > (1.0 * c) / (1.0 * d);
}
bool slowermod(pair<int, int> i1, pair<int, int> i2) {
  if (!slower(i1, i2) && !faster(i1, i2))
    return faster({i1.first, i1.second + 2 * w}, {i2.first, i2.second + 2 * w});
  else
    return slower(i1, i2);
}
int main() {
  scanf("%d %d", &n, &w);
  for (int i = 0; i < n; i++) {
    int x, v;
    scanf("%d %d", &x, &v);
    if (x < 0)
      vec_neg.push_back({-x, v});
    else
      vec_pos.push_back({x, -v});
    if (x < 0) {
      pos_slw.push_back({x, v - w});
      pos_fst.push_back({x, v + w});
      nfst.push_back({x, abs(v) + w});
      nslw.push_back({x, abs(v) - w});
    } else {
      pfst.push_back({x, abs(v) + w});
      pslw.push_back({x, abs(v) - w});
    }
  }
  sort(pos_fst.begin(), pos_fst.end(), faster);
  sort(pos_slw.begin(), pos_slw.end(), faster);
  long long res = 0;
  for (auto i : vec_pos) {
    if (pos_fst.size() == 0) break;
    pair<int, int> tfs = {i.first, (abs(i.second) + w)};
    pair<int, int> tsl = {i.first, (abs(i.second) - w)};
    if (faster(tsl, pos_fst[0])) continue;
    if (slower(tfs, pos_slw.back())) continue;
    int kir1 = 0, kan1 = pos_fst.size() - 1;
    while (kir1 < kan1) {
      int mid = (1 + kir1 + kan1) / 2;
      if (slower(pos_fst[mid], tsl))
        kan1 = mid - 1;
      else
        kir1 = mid;
    }
    int kir2 = 0, kan2 = pos_slw.size() - 1;
    while (kir2 < kan2) {
      int mid = (kir2 + kan2) / 2;
      if (faster(pos_slw[mid], tfs))
        kir2 = mid + 1;
      else
        kan2 = mid;
    }
    res += 1LL * (kir1 - kir2 + 1);
  }
  sort(pfst.begin(), pfst.end(), slowermod);
  sort(pslw.begin(), pslw.end(), slowermod);
  sort(nfst.begin(), nfst.end(), slowermod);
  sort(nslw.begin(), nslw.end(), slowermod);
  for (int i = 1; i <= n; i++) update(i, 1);
  for (int i = 0; i < (int)pslw.size() - 1; i++) {
    bool bol = slower(pslw[i], pslw[i + 1]);
    pair<int, int> it = pslw[i];
    it.second += 2 * w;
    int kir = 0, kan = pfst.size() - 1;
    while (kir < kan) {
      int mid = (kir + kan + 1) / 2;
      if (slower(it, pfst[mid]))
        kan = mid - 1;
      else
        kir = mid;
    }
    update(kir + 1, -1);
    res += query(1, kir + 1);
  }
  for (int i = 1; i <= n; i++) update(i, -query(i, i) + 1);
  for (int i = 0; i < (int)nslw.size() - 1; i++) {
    bool bol = slower(nslw[i], nslw[i + 1]);
    pair<int, int> it = nslw[i];
    it.second += 2 * w;
    int kir = 0, kan = nfst.size() - 1;
    while (kir < kan) {
      int mid = (kir + kan + 1) / 2;
      if (slower(it, nfst[mid]))
        kan = mid - 1;
      else
        kir = mid;
    }
    update(kir + 1, -1);
    res += query(1, kir + 1);
  }
  printf("%lld\n", res);
}
