#include <bits/stdc++.h>
using namespace std;
long long int inf = pow(10, 18);
long long int modulo = pow(10, 9) + 7;
long double eps = 1e-9;
ifstream in;
ofstream out;
long long int sy = 0;
long long int fen[100010] = {};
struct ara {
  pair<long long int, long long int> start;
  pair<long long int, long long int> end;
  long long int index;
};
void upd(long long int ind, long long int vl) {
  while (ind < 100010) {
    fen[ind] += vl;
    ind += ind & -ind;
  }
}
long long int que(long long int ind) {
  long long int s = 0;
  while (ind) {
    s += fen[ind];
    ind -= ind & -ind;
  }
  return s;
}
long long int gcd(long long int a, long long int b) {
  return !b ? a : gcd(b, a % b);
}
void fix(pair<long long int, long long int> &a) {
  long long int ebob = gcd(a.first, a.second);
  a.first /= ebob, a.second /= ebob;
}
bool J(ara &a, ara &b) {
  return a.start.first * b.start.second < a.start.second * b.start.first;
}
bool J1(ara &a, ara &b) {
  return a.end.first * b.end.second < a.end.second * b.end.first;
}
void handle(vector<ara> &a) {
  long long int n = a.size();
  sort(a.begin(), a.end(), J1);
  long long int keep = 1;
  for (int i = 0; i < n; i++) {
    a[i].index = keep;
    upd(keep, 1);
    if (i + 1 < n && !(!J1(a[i], a[i + 1]) && !J1(a[i + 1], a[i]))) ++keep;
  }
  sort(a.begin(), a.end(), J);
  ;
  for (long long int i = 0; i < n;) {
    long long int st = i;
    while (st < n && !J(a[i], a[st]) && !J(a[st], a[i]))
      upd(a[st].index, -1), ++st;
    sy += (st - i) * (st - i - 1) / 2;
    while (i < st) {
      sy += que(a[i].index);
      ++i;
    }
  }
}
long long int ind(ara &aa, vector<ara> &all) {
  long long int a = 0, b = all.size() - 1;
  if (!all.size() || J(aa, all[0])) return 0;
  while (a < b) {
    long long int c = (a + b) / 2 + 1;
    if (J(aa, all[c]))
      b = c - 1;
    else
      a = c;
  }
  return a + 1;
}
void deal() {
  long long int n, w;
  cin >> n >> w;
  vector<ara> all[2];
  for (int i = 0; i < n; i++) {
    long long int x, v;
    cin >> x >> v;
    ara a;
    long long int kd = 0;
    if (x < 0)
      x = -x;
    else
      v = -v, kd = 1;
    a.start.first = x, a.end.first = x;
    a.start.second = (v + w), a.end.second = v - w;
    fix(a.start);
    fix(a.end);
    all[kd].push_back(a);
  }
  sort(all[0].begin(), all[0].end(), J);
  sort(all[1].begin(), all[1].end(), J);
  for (long long int kd = 0; kd < 2; ++kd)
    for (int i = 0; i < all[kd].size(); i++) {
      long long int ind1, ind2;
      ind1 = ind(all[kd][i], all[!kd]);
      pair<long long int, long long int> temp = all[kd][i].start;
      all[kd][i].start = all[kd][i].end;
      ind2 = ind(all[kd][i], all[!kd]);
      all[kd][i].start = temp;
      sy += ind2 - ind1;
    }
  map<long long int, long long int> last;
  for (int i = 0; i < all[0].size(); i++)
    all[0][i].start.first *= 3 * pow(10, 5),
        last[all[0][i].start.first + all[0][i].start.second]++;
  for (int i = 0; i < all[1].size(); i++)
    all[1][i].start.first *= 3 * pow(10, 5),
        sy += last[all[1][i].start.first + all[1][i].start.second];
  handle(all[0]);
  handle(all[1]);
  cout << sy << endl;
}
int main() { deal(); }
