#include <bits/stdc++.h>
using namespace std;
const int inf = 2000000000;
static inline int Rint() {
  struct X {
    int dig[256];
    X() {
      for (int i = '0'; i <= '9'; ++i) dig[i] = 1;
      dig['-'] = 1;
    }
  };
  static X fuck;
  int s = 1, v = 0, c;
  for (; !fuck.dig[c = getchar()];)
    ;
  if (c == '-')
    s = 0;
  else if (fuck.dig[c])
    v = c ^ 48;
  for (; fuck.dig[c = getchar()]; v = v * 10 + (c ^ 48))
    ;
  return s ? v : -v;
}
template <typename T>
static inline void cmax(T& a, const T& b) {
  if (b > a) a = b;
}
template <typename T>
static inline void cmin(T& a, const T& b) {
  if (b < a) a = b;
}
const int maxn = 100005;
int A[105];
int X[105], Y[105];
int n, d;
static inline long long dist(int i, int j) {
  return abs(X[i] - X[j]) + abs(Y[i] - Y[j]);
}
long long dp[105];
int iq[105];
int check(long long mid) {
  memset(dp, -1, sizeof dp);
  memset(iq, 0, sizeof iq);
  queue<int> q;
  q.push(1);
  iq[1] = 1;
  dp[1] = mid;
  while (!q.empty()) {
    int curr = q.front();
    q.pop();
    long long have = dp[curr] + A[curr];
    for (int i = 1; i <= n; ++i)
      if (i != curr) {
        const long long need = dist(curr, i) * d;
        if (need <= have) {
          const long long t = have - need;
          if (t > dp[i]) {
            dp[i] = t;
            if (!iq[i]) {
              iq[i] = 1;
              q.push(i);
            }
          }
        }
      }
    iq[curr] = 0;
  }
  return dp[n] >= 0;
}
int main() {
  n = Rint();
  d = Rint();
  for (int i = 2; i < n; ++i) A[i] = Rint();
  for (int i = 1; i <= n; ++i) X[i] = Rint(), Y[i] = Rint();
  long long l = 0, r = 1000LL * d;
  while (l <= r) {
    const long long mid = l + r >> 1;
    if (check(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  cout << l << endl;
  return 0;
}
