#include <bits/stdc++.h>
using namespace std;
const int N = 55, size = 1 << 20, mod = 998244353, inf = 2e9;
const long long INF = 1e15;
template <class o>
void qr(o& x) {
  char c = getchar();
  x = 0;
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x *= f;
}
template <class o>
void qw(o x) {
  if (x / 10) qw(x / 10);
  putchar(x % 10 + '0');
}
template <class o>
void pr1(o x) {
  if (x < 0) x = -x, putchar('-');
  qw(x);
  putchar(' ');
}
template <class o>
void pr2(o x) {
  if (x < 0) x = -x, putchar('-');
  qw(x);
  putchar('\n');
}
long long gcd(long long a, long long b) { return !a ? b : gcd(b % a, a); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long power(long long a, long long b = mod - 2, long long p = mod) {
  long long c = 1;
  while (b) {
    if (b & 1) c = c * a % p;
    b /= 2;
    a = a * a % p;
  }
  return c;
}
template <class o>
void cmax(o& x, o y) {
  if (x < y) x = y;
}
template <class o>
void cmin(o& x, o y) {
  if (x > y) x = y;
}
template <typename t1, typename t2>
void ad(t1& x, t2 y) {
  x += y;
  if (x >= mod) x -= mod;
}
template <typename t1, typename t2>
void dl(t1& x, t2 y) {
  x -= y;
  if (x < 0) x += mod;
}
int n, x[N], y[N], t, in[N * N], tot;
namespace rec {
const int N = 210;
struct node {
  int c, l;
} tr[N << 2];
int val[N], num;
void add(int x, int l, int r, int L, int R, int d) {
  if (L <= l && r <= R) {
    tr[x].c += d;
    if (tr[x].c)
      tr[x].l = val[r + 1] - val[l];
    else if (l == r)
      tr[x].l = 0;
    else
      tr[x].l = tr[x << 1].l + tr[x << 1 | 1].l;
    return;
  }
  int mid = (l + r) / 2;
  if (L <= mid) add(x << 1, l, mid, L, R, d);
  if (R > mid) add(x << 1 | 1, mid + 1, r, L, R, d);
  if (!tr[x].c) tr[x].l = tr[x << 1].l + tr[x << 1 | 1].l;
}
int get(int x) { return lower_bound(val + 1, val + num + 1, x) - val; }
struct E {
  int l, r, d;
};
vector<E> eve[N];
long long f(int t) {
  val[num = 0] = 0;
  for (int i = 1; i <= n; i++) {
    val[++num] = x[i] - t;
    val[++num] = x[i] + t + 1;
    val[++num] = y[i] - t;
    val[++num] = y[i] + t + 1;
  }
  sort(val + 1, val + num + 1);
  num = unique(val + 1, val + num + 1) - (val + 1);
  for (int i = 1; i <= num; i++) eve[i].clear();
  for (int i = 1; i <= n; i++) {
    int xx = get(x[i] - t), X = get(x[i] + t + 1), yy = get(y[i] - t),
        Y = get(y[i] + t + 1) - 1;
    eve[xx].push_back((E){yy, Y, 1});
    eve[X].push_back((E){yy, Y, -1});
  }
  long long ans = 0;
  val[0] = val[1];
  for (int i = 1; i <= num; i++) {
    ad(ans, (long long)tr[1].l * (val[i] - val[i - 1]) % mod);
    for (auto j : eve[i]) add(1, 1, num - 1, j.l, j.r, j.d);
  }
  return ans;
}
}  // namespace rec
long long inv2 = (mod + 1) / 2, inv3 = (mod + 1) / 3, inv6 = inv2 * inv3 % mod;
long long s1(long long x) {
  x %= mod;
  return (x + 1) * x / 2 % mod;
}
long long s2(long long x) {
  x %= mod;
  return x * (x + 1) % mod * (2 * x + 1) % mod * inv6 % mod;
}
int main() {
  qr(n);
  qr(t);
  for (int i = 1; i <= n; i++) qr(x[i]), qr(y[i]);
  in[tot = 1] = 0;
  in[++tot] = t;
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      int tmp = max(abs(x[i] - x[j]), abs(y[i] - y[j])) >> 1;
      if (tmp <= t) in[++tot] = tmp;
      if (++tmp <= t) in[++tot] = tmp;
    }
  sort(in + 1, in + tot + 1);
  tot = unique(in + 1, in + tot + 1) - (in + 1);
  long long ans = rec::f(t) * t % mod;
  tot--;
  for (int i = 1; i <= tot; i++) {
    int l = in[i], r = in[i + 1];
    if (l + 3 > r) {
      while (l < r) dl(ans, rec::f(l++));
    } else {
      long long u = rec::f(l), v = rec::f(l + 1), w = rec::f(l + 2);
      long long a = (u + w - 2 * (v - mod)) * inv2 % mod;
      long long b = ((v - u - a) % mod + mod) % mod;
      dl(ans, a * s2(r - l - 1) % mod);
      dl(ans, b * s1(r - l - 1) % mod);
      dl(ans, u * (r - l) % mod);
    }
  }
  pr2(ans);
  return 0;
}
