#include <bits/stdc++.h>
using namespace std;
int N, a, b, d, dist, c, m;
int K;
int dp[1234];
int in[1000007];
int benefit[1234];
int X[125], Y[1254];
int getAbs(int x, int y) { return abs(X[x] - X[y]) + abs(Y[x] - Y[y]); }
bool likeDJ(int mid) {
  bool vis[125] = {0};
  memset(dp, -1, sizeof(dp));
  dp[1] = mid;
  priority_queue<pair<int, int> > pq;
  pq.push(make_pair(dp[1], 1));
  while (!pq.empty()) {
    pair<int, int> nowa = pq.top();
    int v = nowa.second;
    int dst = nowa.first;
    pq.pop();
    vis[v] = 1;
    if (v == N) return 1;
    for (int i = 1; i <= N; i++) {
      if (vis[i]) continue;
      if (dp[i] < dp[v] - d * getAbs(v, i) + benefit[i]) {
        dp[i] = dp[v] - d * getAbs(v, i) + benefit[i];
        pq.push({dp[i], i});
      }
    }
  }
  return 0;
}
int main() {
  scanf("%d %d", &N, &d);
  for (int i = 2; i <= N - 1; i++) {
    scanf("%d", &benefit[i]);
  }
  for (int i = 1; i <= N; i++) {
    scanf("%d %d", &X[i], &Y[i]);
  }
  long long s = 0, e = 555256060;
  long long mid = 0;
  int pas = -1;
  while (s <= e) {
    mid = (s + e) >> 1;
    if (likeDJ(mid)) {
      e = mid - 1;
      pas = mid;
    } else
      s = mid + 1;
  }
  printf("%d", pas);
  return 0;
}
