#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &x) {
  x = 0;
  char c = getchar();
  int f = 0;
  while (c < '0' || c > '9') f |= (c == '-'), c = getchar();
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  if (f) x = -x;
}
template <class T>
T _max(T a, T b) {
  return b > a ? b : a;
}
template <class T>
T _min(T a, T b) {
  return b < a ? b : a;
}
template <class T>
bool checkmax(T &a, T b) {
  return b > a ? a = b, 1 : 0;
}
template <class T>
bool checkmin(T &a, T b) {
  return b < a ? a = b, 1 : 0;
}
const int mod = 998244353, N = 52, inv2 = (mod + 1) / 2, inv6 = (mod + 1) / 6;
int Add(int a, int b) {
  a += b;
  return a >= mod ? a - mod : a;
}
int Sub(int a, int b) {
  a -= b;
  return a < 0 ? a + mod : a;
}
int Mul(int a, int b) { return (long long)a * b % mod; }
void add(int &a, int b) {
  a += b;
  (a >= mod) && (a -= mod);
}
void sub(int &a, int b) {
  a -= b;
  (a < 0) && (a += mod);
}
void mul(int &a, int b) { a = (long long)a * b % mod; }
int qpow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = (long long)ans * a % mod;
    a = (long long)a * a % mod;
    b >>= 1;
  }
  return ans;
}
int Add(int a, int b, int c) { return Add(Add(a, b), c); }
int Mul(int a, int b, int c) { return Mul(Mul(a, b), c); }
int Mul(int a, int b, int c, int d) { return Mul(Mul(a, b), Mul(c, d)); }
int mabs(int x) { return x > 0 ? x : -x; }
int S2(int x) { return Mul(Mul(x, x + 1), Mul(x + x + 1, inv6)); }
int n, t, ans = 0;
int x[N], y[N];
int arr[N << 1], cover[N << 1];
int T[N * N], total = 0;
struct Line {
  int y, x1, x2, typ;
  Line(int y = 0, int a = 0, int b = 0, int t = 0)
      : y(y), x1(a), x2(b), typ(t) {}
  bool operator<(const Line &rhs) const { return y < rhs.y; }
} l[N << 1];
int calc(int d) {
  int top = 0, num = 0;
  for (int i = 1; i <= n; ++i) {
    l[++top] = Line(y[i] - d, x[i] - d, x[i] + d, 1);
    l[++top] = Line(y[i] + d + 1, x[i] - d, x[i] + d, -1);
    arr[++num] = x[i] - d;
    arr[++num] = x[i] + d + 1;
  }
  sort(arr + 1, arr + num + 1);
  arr[num + 1] = arr[num];
  num = unique(arr + 1, arr + num + 1) - arr - 1;
  sort(l + 1, l + top + 1);
  int ans = 0, pre_len = 0, pre_y = 0;
  for (int i = 1; i <= top;) {
    int j = i;
    while (j < top && l[j + 1].y == l[i].y) ++j;
    add(ans, Mul(pre_len, l[i].y - pre_y));
    for (int r = i; r <= j; ++r) {
      int L = lower_bound(arr + 1, arr + num + 1, l[r].x1) - arr;
      int R = lower_bound(arr + 1, arr + num + 1, l[r].x2 + 1) - arr;
      for (int k = L; k < R; ++k) cover[k] += l[r].typ;
    }
    pre_len = 0;
    pre_y = l[i].y;
    for (int k = 1; k <= num; ++k)
      if (cover[k]) add(pre_len, arr[k + 1] - arr[k]);
    i = j + 1;
  }
  return ans;
}
void calc_poly(int L, int R, int f1, int f2, int f3) {
  int x1 = L, x2 = L + 1, x3 = L + 2;
  mul(f2, mod - 1);
  int A = Add(Mul(inv2, f1), f2, Mul(inv2, f3));
  int B = Add(Mul(inv2, x2 + x3, f1), Mul(inv2, x1 + x2, f3), Mul(x1 + x3, f2));
  mul(B, mod - 1);
  int C = Add(Mul(f1, x2, x3, inv2), Mul(f2, x1, x3), Mul(f3, x1, x2, inv2));
  sub(ans, Mul(R - L + 1, C));
  sub(ans, Mul(B, (long long)(L + R) * (R - L + 1) / 2 % mod));
  sub(ans, Mul(A, Sub(S2(R), S2(L - 1))));
}
void init() {
  read(n);
  read(t);
  for (int i = 1; i <= n; ++i) {
    read(x[i]);
    read(y[i]);
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      T[++total] = (mabs(x[i] - x[j]) + 1) / 2;
      T[++total] = (mabs(y[i] - y[j]) + 1) / 2;
    }
  }
  T[++total] = 0;
  T[++total] = t + 1;
  sort(T + 1, T + total + 1);
  total = unique(T + 1, T + total + 1) - T - 1;
  while (total && T[total] > t + 1) --total;
}
void solve() {
  ans = Mul(calc(t), t + 1);
  for (int i = 0; i < total; ++i) {
    if (T[i + 1] - T[i] <= 3) {
      for (int j = T[i]; j < T[i + 1]; ++j) sub(ans, calc(j));
      continue;
    }
    calc_poly(T[i], T[i + 1] - 1, calc(T[i]), calc(T[i] + 1), calc(T[i] + 2));
  }
  printf("%d\n", ans);
}
int main() {
  init();
  solve();
  return 0;
}
