#include <bits/stdc++.h>
using namespace std;
const int N = 5000, p = 998244353;
map<int, int> e;
int n, t, ans, x[N], y[N], q[N], g[N], c[N], f1[N], f2[N], g1[N], g2[N];
inline long long pows(long long u, int v) {
  long long ans = 1;
  while (v > 0) {
    if (v & 1) ans = ans * u % p;
    u = u * u % p, v = v >> 1;
  }
  return ans;
}
inline int getans(int d) {
  f1[0] = 0, f2[0] = 0;
  int ans = 0;
  for (int i = 1; i <= n; i++)
    f1[++f1[0]] = x[i] - d - 1, f1[++f1[0]] = x[i] + d,
    f2[++f2[0]] = y[i] - d - 1, f2[++f2[0]] = y[i] + d;
  sort(f1 + 1, f1 + f1[0] + 1), sort(f2 + 1, f2 + f2[0] + 1);
  e.clear();
  for (int i = 1; i <= f1[0]; i++) e[f1[i]] = i;
  for (int i = 1; i <= n; i++) g1[i] = e[x[i] - d - 1], g2[i] = e[x[i] + d];
  for (int x = 1; x <= f1[0]; x++) q[x] = 0;
  for (int i = 1; i < f2[0]; i++) {
    if (f2[i] == f2[i + 1]) continue;
    for (int x = 1; x <= f1[0]; x++) c[x] = 0;
    for (int x = 1; x <= n; x++)
      if (f2[i] == y[x] - d - 1) c[g1[x]]++, c[g2[x]]--;
    for (int x = 1; x <= n; x++)
      if (f2[i] == y[x] + d) c[g1[x]]--, c[g2[x]]++;
    for (int x = 1; x <= f1[0]; x++) c[x] += c[x - 1], q[x] += c[x];
    for (int x = 1; x < f1[0]; x++)
      if (q[x] > 0)
        ans = (ans + 1ll * (f2[i + 1] - f2[i]) * (f1[x + 1] - f1[x])) % p;
  }
  return ans;
}
inline void solve(int l, int r) {
  if (l > r) return;
  if (r - l + 1 <= 4) {
    for (int i = l; i <= r; i++)
      ans = (ans + 1ll * (getans(i) - getans(i - 1) + p) * i) % p;
    return;
  } else {
    int ch[4];
    ch[0] = 1ll * (getans(l) - getans(l - 1) + p) * l % p;
    ch[1] = (ch[0] + 1ll * (getans(l + 1) - getans(l) + p) * (l + 1)) % p;
    ch[2] = (ch[1] + 1ll * (getans(l + 2) - getans(l + 1) + p) * (l + 2)) % p;
    ch[3] = (ch[2] + 1ll * (getans(l + 3) - getans(l + 2) + p) * (l + 3)) % p;
    r = r - l;
    for (int i = 0; i <= 3; i++) {
      int v = 1;
      for (int j = 0; j <= 3; j++)
        if (i != j) v = v * pows((i - j + p), p - 2) % p * (r - j) % p;
      ans = (ans + 1ll * v * ch[i]) % p;
    }
  }
}
int main() {
  cin >> n >> t, g[++g[0]] = 1, g[++g[0]] = t + 1;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) {
      int l = 1, r = t, w = 0;
      while (l <= r) {
        int d = (l + r) >> 1;
        if (max(x[i], x[j]) - d <= min(x[i], x[j]) + d &&
            max(y[i], y[j]) - d <= min(y[i], y[j]) + d)
          w = d, r = d - 1;
        else
          l = d + 1;
      }
      if (w > 0) g[++g[0]] = w;
    }
  sort(g + 1, g + g[0] + 1);
  for (int i = 1; i < g[0]; i++) solve(g[i], g[i + 1] - 1);
  cout << ans << endl;
}
