#include <bits/stdc++.h>
using namespace std;
int n, d;
int a[100], x[100], y[100];
long long dist[100][100];
bool vis[100];
long long best[100];
bool solve(long long s) {
  priority_queue<pair<long long, int> > q;
  q.push(make_pair(s, 0));
  memset(vis, 0, sizeof(vis));
  memset(best, -1, sizeof(best));
  while (!q.empty()) {
    long long time = q.top().first;
    int x = q.top().second;
    q.pop();
    vis[x] = true;
    if (x == n - 1) return true;
    for (int i = 0; i < (int)(n); i++) {
      if (vis[i]) continue;
      long long time_t = time - dist[x][i];
      if (time_t < 0) continue;
      time_t += a[i];
      if (time_t > best[i]) {
        q.push(make_pair(time_t, i));
        best[i] = time_t;
      }
    }
  }
  return false;
}
int main() {
  cin >> n >> d;
  for (int i = (int)(1); i < (int)(n - 1); i++) cin >> a[i];
  for (int i = 0; i < (int)(n); i++) cin >> x[i] >> y[i];
  for (int i = 0; i < (int)(n); i++)
    for (int j = 0; j < (int)(n); j++)
      dist[i][j] = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * d;
  int lo = 0;
  int hi = 100000000;
  while (hi - lo > 1) {
    int mid = (lo + hi) / 2;
    if (solve(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << hi << endl;
  return 0;
}
