#include <bits/stdc++.h>
const int N = 50 + 5, MOD = 998244353;
const int ifac[] = {1, 1, (MOD + 1) / 2};
int n, t, x[N], y[N], val[N * 2];
struct Info {
  int x, l, r, opt;
};
inline int norm(const int x);
struct Func {
  int a, b, c;
  Func(int a = 0, int b = 0, int c = 0) : a(a), b(b), c(c) {}
  inline Func operator+(const Func &rhs) const {
    return Func(norm(a + rhs.a), norm(b + rhs.b), norm(c + rhs.c));
  }
};
inline int norm(const int x) { return x < MOD ? x : x - MOD; }
inline void add(int &x, const int y) { (x += y) >= MOD && (x -= MOD); }
inline int S1(int l, int r) {
  return (long long)(l + r) * (r - l + 1) / 2 % MOD;
}
inline int S2(int n) {
  const static int I6 = (MOD + 1) / 6;
  return (long long)n * (n + 1) % MOD * (2 * n + 1) % MOD * I6 % MOD;
}
inline int S2(int l, int r) {
  return norm(S2(r) - (l > 1 ? S2(l - 1) : 0) + MOD);
}
inline Func largrange(int *x, int *y) {
  Func ans;
  for (int i = 0; i < 3; i++) {
    int coef = (long long)y[i] * ifac[i] * ifac[2 - i] % MOD;
    if (i & 1) {
      coef = MOD - coef;
    }
    int sum = 0, mul = 1;
    for (int j = 0; j < 3; j++) {
      if (i != j) {
        add(sum, x[j]);
        mul = (long long)mul * x[j] % MOD;
      }
    }
    ans = ans + Func(coef, (long long)coef * (MOD - sum) % MOD,
                     (long long)coef * mul % MOD);
  }
  return ans;
}
inline int calc(int t) {
  std::vector<int> vec;
  for (int i = 1; i <= n; i++) {
    vec.push_back(y[i] - t);
    vec.push_back(y[i] + t + 1);
  }
  std::sort(vec.begin(), vec.end());
  vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
  std::vector<Info> q;
  for (int i = 1; i <= n; i++) {
    int l = std::lower_bound(vec.begin(), vec.end(), y[i] - t) - vec.begin();
    int r =
        std::lower_bound(vec.begin(), vec.end(), y[i] + t + 1) - vec.begin();
    q.push_back(Info{x[i] - t, l, r, 1});
    q.push_back(Info{x[i] + t + 1, l, r, -1});
  }
  std::sort(q.begin(), q.end(),
            [](const Info &x, const Info &y) { return x.x < y.x; });
  int m = vec.size(), lst = 0, ans = 0;
  for (auto o : q) {
    int sum = 0;
    for (int i = 0; i < m; i++) {
      if (val[i] > 0) {
        sum += vec[i + 1] - vec[i];
      }
    }
    add(ans, (long long)(o.x - lst) * sum % MOD);
    for (int i = o.l; i < o.r; i++) {
      val[i] += o.opt;
    }
    lst = o.x;
  }
  return ans;
}
inline int calc(int l, int r) {
  int x[3] = {l, l + 1, l + 2}, y[3] = {calc(l), calc(l + 1), calc(l + 2)};
  Func f = largrange(x, y);
  return ((long long)f.a * S2(l, r) % MOD + (long long)f.b * S1(l, r) % MOD +
          (long long)f.c * (r - l + 1) % MOD) %
         MOD;
}
int main() {
  scanf("%d%d", &n, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  std::vector<int> vec = {t};
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      int dis = std::max(std::abs(x[i] - x[j]), std::abs(y[i] - y[j])) - 1;
      if (dis / 2 < t) {
        vec.push_back(dis / 2 + 1);
      }
    }
  }
  std::sort(vec.begin(), vec.end());
  vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
  int l = 0, ans = 0;
  for (auto r : vec) {
    add(ans, calc(l, r - 1));
    l = r;
  }
  printf("%d\n", norm((long long)t * calc(t, t) % MOD - ans + MOD));
  return 0;
}
