#include <bits/stdc++.h>
using namespace std;
pair<int, int> P[107];
int A[107];
int Dist[107];
int wt(pair<int, int> &X, pair<int, int> &Y, int &d) {
  return (abs(X.first - Y.first) + abs(X.second - Y.second)) * d;
}
bool chk(int start, int &d, int &n) {
  int i, j, k;
  for (i = 1; i <= n; i++) Dist[i] = INT_MIN;
  Dist[1] = start;
  for (i = 1; i <= n - 1; i++) {
    for (j = 1; j <= n; j++) {
      for (k = 1; k <= n; k++) {
        if (j != k) {
          if (Dist[j] >= 0 && Dist[j] - wt(P[j], P[k], d) >= 0 &&
              Dist[j] - wt(P[j], P[k], d) + A[k] >= 0 &&
              Dist[k] < Dist[j] - wt(P[j], P[k], d) + A[k]) {
            Dist[k] = Dist[j] - wt(P[j], P[k], d) + A[k];
          }
        }
      }
    }
  }
  if (Dist[n] >= 0) return true;
  return false;
}
int main() {
  int i, j, k, l, m, n, x, y, z, a, b, c, d, r, fs, ls, md;
  scanf("%d", &n);
  scanf("%d", &d);
  for (i = 2; i <= n - 1; i++) {
    scanf("%d", &A[i]);
  }
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    scanf("%d", &y);
    P[i] = make_pair(x, y);
  }
  fs = 0;
  ls = d * 400;
  while (fs + 1 < ls) {
    md = (fs + ls) / 2;
    if (chk(md, d, n))
      ls = md;
    else
      fs = md;
  }
  if (chk(fs, d, n))
    printf("%d\n", fs);
  else
    printf("%d\n", ls);
  return 0;
}
