#include <bits/stdc++.h>
using namespace std;
template <typename T>
void maxtt(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T& t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "URDL";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int& x, int y, int mod = 998244353) {
  assert(y >= 0);
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 998244353) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
struct Point {
  long long x, y;
  Point() {}
  Point(long long x, long long y) : x(x), y(y) {}
  long double abs() const { return hypot(x, y); }
  long double arg() const { return atan2(y, x); }
  Point operator*(double o) const { return Point(x * o, y * o); }
  Point operator+(const Point& o) const { return Point(x + o.x, y + o.y); }
  Point operator-(const Point& o) const { return Point(x - o.x, y - o.y); }
  Point operator/(double o) const { return Point(x / o, y / o); }
  bool operator<(const Point& o) const {
    return x < o.x || (x == o.x && y < o.y);
  }
  friend bool operator==(const Point& r1, const Point& r2) {
    return r1.x == r2.x && r1.y == r2.y;
  }
  Point scale(double o) const { return *this * (o / abs()); }
  Point rotY() const { return Point(-y, x); }
  Point rotX() const { return Point(y, -x); }
  long long cross(Point b) const { return x * b.y - b.x * y; }
  long long dot(Point b) const { return x * b.x + y * b.y; }
  void readin() { scanf("%lld%lld", &x, &y); }
};
Point p[60];
vector<long long> vp;
long long T;
long long f(long long t) {
  vector<long long> y;
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    y.push_back(p[i].y - t);
    y.push_back(p[i].y + t + 1);
  }
  sort(y.begin(), y.end());
  long long ss = 0;
  for (int(i) = 0; (i) < (int)(n + n); (i)++) {
    long long L = -(1LL << 60);
    for (int(j) = 0; (j) < (int)(n); (j)++) {
      if (p[j].y - t > y[i] || p[j].y + t + 1 <= y[i]) continue;
      if (p[j].x + t <= L) continue;
      ss += (y[i + 1] - y[i]) * (p[j].x + t - max(L, p[j].x - t - 1));
      L = p[j].x + t;
    }
  }
  return ss % 998244353;
}
int i2, i6;
long long s2(long long x) {
  if (x <= 0) return 0;
  return x % 998244353 * (x + 1) % 998244353 * i2 % 998244353;
}
long long s3(long long x) {
  if (x <= 0) return 0;
  return x % 998244353 * ((x + 1) % 998244353) % 998244353 *
         ((x + x + 1) % 998244353) % 998244353 * i6 % 998244353;
}
long long b[5];
void fmain(int tid) {
  i2 = fastPow(2, 998244353 - 2);
  i6 = fastPow(6, 998244353 - 2);
  scanf("%d%lld", &n, &T);
  for (int(i) = 0; (i) < (int)(n); (i)++) p[i].readin();
  sort(p, p + n);
  for (int(i) = 0; (i) < (int)(n); (i)++)
    for (int j = i + 1; j < n; j++) {
      Point tt = p[i] - p[j];
      vp.push_back((max(abs(tt.x), abs(tt.y)) + 1) / 2);
    }
  vp.push_back(T);
  vp.push_back(0);
  sort(vp.begin(), vp.end());
  int ans = 0;
  for (int i = 0; vp[i] < T; i++) {
    long long dis = vp[i + 1] - vp[i];
    for (int(j) = 0; (j) < (int)(min(3LL, dis)); (j)++) b[j] = f(vp[i] + j);
    if (dis <= 3)
      for (int(j) = 0; (j) < (int)(dis); (j)++) addmod(ans, b[j]);
    else {
      addmod(ans, b[0] * dis % 998244353);
      long long B = 998244353 - 3 * b[0] * i2 % 998244353 + 2 * b[1] +
                    998244353 - b[2] * i2 % 998244353;
      long long A = b[0] * i2 + 998244353 - b[1] + b[2] * i2 % 998244353;
      A %= 998244353;
      B %= 998244353;
      addmod(ans, A * (dis - 1) % 998244353 * dis % 998244353 * (2 * dis - 1) %
                      998244353 * i6 % 998244353);
      addmod(ans, B * (dis - 1) % 998244353 * dis % 998244353 * i2 % 998244353);
    }
  }
  long long A = T * f(T) % 998244353 + 998244353 - ans;
  A %= 998244353;
  printf("%lld\n", A);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
