#include <bits/stdc++.h>
using namespace std;
int a[111];
int x[111];
int y[111];
int d;
int dist(int i, int j) { return d * (abs(x[i] - x[j]) + abs(y[i] - y[j])); }
int main() {
  int n;
  scanf("%d", &n);
  scanf("%d", &d);
  for (int i = 1; i <= n - 2; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
    scanf("%d", &y[i]);
  }
  long long l = 0, r = 1e18;
  const long long inf = 1e18;
  while (l + 1 < r) {
    vector<long long> b(n, -inf);
    vector<bool> used(n);
    long long m = (l + r) >> 1;
    b[0] = m;
    for (int i = 0; i < n; i++) {
      int mx = -1;
      for (int j = 0; j < n; j++) {
        if (!used[j] && (mx == -1 || b[j] > b[mx])) {
          mx = j;
        }
      }
      if (b[mx] == -inf) {
        break;
      }
      used[mx] = true;
      long long ct = b[mx];
      for (int j = 0; j < n; j++) {
        if (!used[j] && dist(mx, j) <= ct) {
          long long nt = ct - dist(mx, j) + a[j];
          if (nt > b[j]) {
            b[j] = nt;
          }
        }
      }
    }
    if (b[n - 1] == -inf) {
      l = m;
    } else {
      r = m;
    }
  }
  cout << r;
  return 0;
}
