#include <bits/stdc++.h>
using namespace std;
int x[50], y[50];
vector<int> v;
long long int getNum(int t, int n) {
  if (t == 0) return n;
  int i, j;
  long long int c = 0;
  for (i = 0; i < n; i++) {
    int l1 = x[i] - t, r1 = x[i] + t - 1, l2 = x[i] - t + 1, r2 = x[i] + t;
    int d1 = y[i] - t, u1 = y[i] + t - 1, d2 = y[i] - t + 1, u2 = y[i] + t;
    for (j = 0; j < n; j++) {
      if (i == j) continue;
      int l, r, d, u;
      if (j > i)
        l = x[j] - t + 1, r = x[j] + t - 1, d = y[j] - t + 1, u = y[j] + t - 1;
      else
        l = x[j] - t, r = x[j] + t, d = y[j] - t, u = y[j] + t;
      if ((y[i] + t >= d) && (y[i] + t <= u)) {
        if (l <= l1) l1 = max(l1, r + 1);
        if (r >= r1) r1 = min(r1, l - 1);
      }
      if ((y[i] - t >= d) && (y[i] - t <= u)) {
        if (l <= l2) l2 = max(l2, r + 1);
        if (r >= r2) r2 = min(r2, l - 1);
      }
      if ((x[i] - t >= l) && (x[i] - t <= r)) {
        if (d <= d1) d1 = max(d1, u + 1);
        if (u >= u1) u1 = min(u1, d - 1);
      }
      if ((x[i] + t >= l) && (x[i] + t <= r)) {
        if (d <= d2) d2 = max(d2, u + 1);
        if (u >= u2) u2 = min(u2, d - 1);
      }
    }
    c += max(r1 - l1 + 1, 0) + max(r2 - l2 + 1, 0) + max(u1 - d1 + 1, 0) +
         max(u2 - d2 + 1, 0);
  }
  return c;
}
int main() {
  int i;
  int n, t;
  scanf("%d %d", &n, &t);
  for (i = 0; i < n; i++) scanf("%d %d", &x[i], &y[i]);
  int j;
  long long int ans = 0;
  v.push_back(0), v.push_back(1), v.push_back(t + 1);
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      v.push_back(max(abs(x[i] - x[j]), abs(y[i] - y[j])) / 2);
      v.push_back(max(abs(x[i] - x[j]), abs(y[i] - y[j])) / 2 + 1);
    }
  }
  sort(v.begin(), v.end());
  while (v.back() > t + 1) v.pop_back();
  v.resize(unique(v.begin(), v.end()) - v.begin());
  for (i = 0; i < v.size() - 1; i++) {
    if (v[i + 1] == v[i] + 1)
      ans += getNum(v[i], n) * v[i], ans %= 998244353;
    else {
      long long int p = getNum(v[i], n) % 998244353,
                    q = getNum(v[i] + 1, n) % 998244353;
      long long int a = (q - p + 998244353) % 998244353,
                    b = (p - (q - p) * v[i]) % 998244353;
      if (b < 0) b += 998244353;
      long long int s1 = ((((((long long int)(v[i] - 1) * v[i]) % 998244353) *
                            (2 * v[i] - 1)) %
                           998244353) *
                          166374059) %
                         998244353;
      long long int s2 =
          ((((((long long int)(v[i + 1] - 1) * v[i + 1]) % 998244353) *
             (2 * v[i + 1] - 1)) %
            998244353) *
           166374059) %
          998244353;
      ans += (s2 - s1 + 998244353) * a, ans %= 998244353;
      s1 = ((((long long int)(v[i] - 1) * v[i]) % 998244353) * 499122177) %
           998244353;
      s2 = ((((long long int)(v[i + 1] - 1) * v[i + 1]) % 998244353) *
            499122177) %
           998244353;
      ans += (s2 - s1 + 998244353) * b, ans %= 998244353;
    }
  }
  printf("%d\n", (int)ans);
  return 0;
}
