#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 + 10;
int g[maxn][maxn];
int n, d;
int x[maxn], y[maxn];
int t[maxn];
int in[maxn], dist[maxn];
bool spfa(int time) {
  queue<int> Q;
  memset(dist, 0xff, sizeof(dist));
  memset(in, 0, sizeof(in));
  dist[1] = time;
  Q.push(1);
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    in[u] = 0;
    for (int i = 1; i <= n; ++i) {
      if (i != u && dist[i] < dist[u] + t[u] - g[u][i]) {
        dist[i] = dist[u] + t[u] - g[u][i];
        if (!in[i]) {
          Q.push(i);
          in[i] = 1;
        }
      }
    }
  }
  return dist[n] != -1;
}
int main() {
  cin >> n >> d;
  for (int i = 2; i < n; ++i) scanf("%d", t + i);
  for (int i = 1; i <= n; ++i) scanf("%d %d", x + i, y + i);
  t[1] = 0;
  t[n] = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      if (i == j) continue;
      g[i][j] = g[j][i] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
      g[i][j] *= d;
      g[j][i] *= d;
    }
  }
  int l = 0, r = 100000000;
  while (l < r) {
    int mid = (l + r) >> 1;
    if (spfa(mid))
      r = mid;
    else
      l = mid + 1;
  }
  cout << l << "\n";
  return 0;
}
