#include <bits/stdc++.h>
using namespace std;
int w[105][105];
int X[105], Y[105], A[105];
int y[105];
bool works(int lim, int N, int D) {
  y[1] = 0;
  for (int i = (2); i <= (N); ++i) y[i] = 1000000000;
  for (int t = 0; t < (N - 1); ++t) {
    for (int i = (1); i <= (N); ++i) {
      if (y[i] > lim) continue;
      for (int j = (1); j <= (N); ++j) {
        if (j == i) continue;
        if (y[i] + w[i][j] > lim) continue;
        int new_y = y[i] + w[i][j] - A[j];
        if (new_y < y[j]) y[j] = new_y;
      }
    }
  }
  if (y[N] <= lim)
    return true;
  else
    return false;
}
int main() {
  int N, D;
  scanf("%d%d", &N, &D);
  for (int i = (2); i <= (N - 1); ++i) scanf("%d", &A[i]);
  for (int i = (1); i <= (N); ++i) scanf("%d%d", &X[i], &Y[i]);
  for (int i = (1); i <= (N); ++i)
    for (int j = (1); j <= (N); ++j) {
      int dx = abs(X[i] - X[j]);
      int dy = abs(Y[i] - Y[j]);
      w[i][j] = D * (dx + dy);
    }
  int low = 0;
  int high = 1000000000;
  while (low < high) {
    int k = (low + high) / 2;
    if (works(k, N, D))
      high = k;
    else
      low = k + 1;
  }
  assert(low == high);
  assert(works(low, N, D));
  cout << low << endl;
}
