#include <bits/stdc++.h>
using namespace std;
int dist(pair<int, int> p1, pair<int, int> p2) {
  return abs(p1.first - p2.first) + abs(p1.second - p2.second);
}
vector<int> save;
int Path[105][105], M[105][105];
void camino(int i, int j) {
  if (i != j) camino(i, Path[i][j]);
  save.push_back(j);
}
pair<int, int> P[105];
long long n, d, x, y;
long long val[105];
bool f(long long val1) {
  long long tt = val1;
  for (int i = 1; i < save.size(); i++) {
    tt -= dist(P[save[i]], P[save[i - 1]]) * d;
    if (tt < 0) return false;
    tt += val[save[i]];
  }
  return true;
}
int main() {
  cin >> n >> d;
  val[0] = 0;
  for (int i = 1; i < n - 1; i++) {
    cin >> val[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    P[i] = make_pair(x, y);
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) M[i][j] = (1 << 30);
  for (int i = 0; i < n; i++) M[i][i] = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = 0; j < n; j++)
      if (i != j) {
        M[i][j] = (dist(P[i], P[j]) * d) - val[i];
      }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) Path[i][j] = i;
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (M[i][k] + M[k][j] < M[i][j]) {
          M[i][j] = M[i][k] + M[k][j];
          Path[i][j] = Path[k][j];
        }
  camino(0, n - 1);
  long long L = 0, R = 10000000000LL, mid;
  while (abs(L - R) > 1) {
    mid = (L + R) / 2;
    if (f(mid))
      R = mid;
    else
      L = mid;
  }
  if (f(L))
    cout << L << endl;
  else
    cout << R << endl;
  return 0;
}
