#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int MOD = 1000000007;
const int UNDEF = -1;
const int INF = 1 << 30;
template <typename T>
inline bool chkmax(T& aa, T bb) {
  return aa < bb ? aa = bb, true : false;
}
template <typename T>
inline bool chkmin(T& aa, T bb) {
  return aa > bb ? aa = bb, true : false;
}
int rint();
char rch();
long long rlong();
class rat {
 public:
  long long nu, de;
  rat(const long long& n = 0, const long long& d = 1) {
    nu = n;
    de = d;
    if (de < 0) {
      nu = -nu;
      de = -de;
    }
  }
  rat operator+(const rat& b) const {
    return rat(nu * b.de + de * b.nu, de * b.de);
  }
  rat operator-(const rat& b) const {
    return rat(nu * b.de - de * b.nu, de * b.de);
  }
  rat operator-() { return rat(-nu, de); }
  rat operator*(const rat& b) const { return rat(nu * b.nu, de * b.de); }
  rat operator/(const rat& b) const { return rat(nu * b.de, de * b.nu); }
  bool operator==(const rat& b) const { return nu * b.de == b.nu * de; }
  bool operator==(const long long& k) const { return nu == k * de; }
  bool operator<(const rat& b) const { return nu * b.de < b.nu * de; }
  bool operator<=(const rat& b) const { return nu * b.de <= b.nu * de; }
  bool operator>(const rat& b) const { return nu * b.de > b.nu * de; }
  bool operator>=(const rat& b) const { return nu * b.de >= b.nu * de; }
};
template <typename T>
class RemapUnique {
 public:
  vector<T> v;
  void sortmakeunique(vector<T>& myvector) {
    sort(myvector.begin(), myvector.end());
    auto it = std::unique(myvector.begin(), myvector.end());
    myvector.resize(std::distance(myvector.begin(), it));
  }
  void init(vector<T>& _inp) {
    v = _inp;
    sortmakeunique(v);
  }
  int size() { return v.size(); }
  int GTE(const T& key) {
    int imin = 0, imax = v.size();
    while (imin < imax) {
      int imid = (imin + imax) >> 1;
      if (v[imid] < key)
        imin = imid + 1;
      else
        imax = imid;
    }
    return imin;
  }
};
template <int _SEGSZ>
class SumSegTree {
 public:
  static const int SEGSZ = _SEGSZ;
  int segn = _SEGSZ;
  int t[2 * SEGSZ];
  int identity = 0;
  int combine(const int& lefts, const int& rights) { return lefts + rights; }
  void init(int n) { segn = n; }
  void build() {
    int n = segn;
    for (int i = n - 1; i > 0; --i) t[i] = combine(t[i << 1], t[i << 1 | 1]);
  }
  void sset(int p, const int& value) {
    int n = segn;
    for (t[p += n] = value; p >>= 1;) t[p] = combine(t[p << 1], t[p << 1 | 1]);
  }
  void modify(int p, const int& value) {
    int n = segn;
    p += n;
    for (t[p] = combine(t[p], value); p >>= 1;)
      t[p] = combine(t[p << 1], t[p << 1 | 1]);
  }
  int query(int l, int r) {
    r++;
    int n = segn;
    int resl = identity, resr = identity;
    for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
      if (l & 1) resl = combine(resl, t[l++]);
      if (r & 1) resr = combine(t[--r], resr);
    }
    return combine(resl, resr);
  }
};
long long bf1(vector<pair<int, int> > a) {
  set<pair<int, int> > ans;
  for (int x = 0; x < a.size(); x++)
    for (int y = 0; y < a.size(); y++) {
      if (x == y) continue;
      if ((a[x].first <= a[y].first) && a[y].second <= a[x].second) {
        ans.insert(make_pair(min(x, y), max(x, y)));
      }
    }
  return ans.size();
}
long long bf2(vector<pair<int, int> > a, vector<pair<int, int> > b) {
  int ans = 0;
  for (int x = 0; x < a.size(); x++)
    for (int y = 0; y < b.size(); y++) {
      if (!(a[x].second < b[y].first || a[x].first > b[y].second)) {
        ans++;
      }
    }
  return ans;
}
const int mn = 2e5 + 4;
vector<int> a[mn][2][2];
int open[2];
SumSegTree<mn> closebyl[2];
vector<pair<int, int> > tmp[2];
const int L = 0, R = 1;
long long ans1[2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n = rint();
  int w = rint();
  vector<pair<int, int> > inp[2];
  vector<rat> seed;
  for (int i = 0; i < n; i++) {
    int x = rint(), v = rint();
    int t = (x > 0) ? 1 : 0;
    x = abs(x), v = abs(v);
    inp[t].push_back(make_pair(x, v));
    seed.push_back(rat(v - w, x));
    seed.push_back(rat(v + w, x));
  }
  RemapUnique<rat> remap;
  remap.init(seed);
  for (int t = 0; t < 2; t++) {
    for (auto& p : inp[t]) {
      int x = p.first, v = p.second;
      int l = remap.GTE(rat(v - w, x));
      int r = remap.GTE(rat(v + w, x));
      a[l][t][L].push_back(r);
      a[r][t][R].push_back(l);
      tmp[t].push_back(make_pair(l, r));
    }
    for (int x = 0; x < mn; x++)
      sort(a[x][t][R].begin(), a[x][t][R].end(), greater<int>());
  }
  for (int t = 0; t < 2; t++) closebyl[t].init(remap.size());
  long long ans2 = 0;
  for (int x = 0; x < mn; x++) {
    {
      const int t = 0;
      open[t] += a[x][t][L].size();
    }
    for (int t = 0; t < 2; t++) {
      for (auto& l : a[x][t][R]) {
        int got = (closebyl[t].query(l, x));
        closebyl[t].modify(l, 1);
        ans1[t] += got;
      }
      long long c2 = a[x][t][L].size() * (long long)open[t ^ 1];
      ans2 += c2;
    }
    {
      const int t = 1;
      open[t] += a[x][t][L].size();
    }
    for (int t = 0; t < 2; t++) {
      open[t] -= a[x][t][R].size();
    }
  }
  long long ans = ans1[0] + ans1[1] + ans2;
  printf("%lld\n", ans);
}
static char stdinBuffer[1024];
static char* stdinDataEnd = stdinBuffer + sizeof(stdinBuffer);
static const char* stdinPos = stdinDataEnd;
void readAhead(size_t amount) {
  size_t remaining = stdinDataEnd - stdinPos;
  if (remaining < amount) {
    memmove(stdinBuffer, stdinPos, remaining);
    size_t sz = fread(stdinBuffer + remaining, 1,
                      sizeof(stdinBuffer) - remaining, stdin);
    stdinPos = stdinBuffer;
    stdinDataEnd = stdinBuffer + remaining + sz;
    if (stdinDataEnd != stdinBuffer + sizeof(stdinBuffer)) *stdinDataEnd = 0;
  }
}
int rint() {
  readAhead(16);
  int x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
char rch() {
  readAhead(16);
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  char ans = *stdinPos;
  ++stdinPos;
  return ans;
}
long long rlong() {
  readAhead(32);
  long long x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
