#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
const int inf = (int)1e9;
int n, d;
int a[N], x[N], y[N], visited[N];
vector<pair<int, int> > e[N];
void Read() {
  cin >> n >> d;
  for (int i = 2; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
}
inline int dist(int u, int v) { return abs(x[u] - x[v]) + abs(y[u] - y[v]); }
void Init() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (i == j) {
        continue;
      }
      e[i].push_back(make_pair(j, d * dist(i, j)));
    }
  }
}
bool Dijsktra(int mid) {
  priority_queue<pair<int, int> > Q;
  int d[N], visited[N];
  memset(d, 0, sizeof d);
  memset(visited, 0, sizeof visited);
  d[1] = mid;
  Q.push(make_pair(mid, 1));
  while (!Q.empty()) {
    pair<int, int> A = Q.top();
    Q.pop();
    int u = A.second;
    visited[u] = 1;
    for (int i = 0; i < (int)e[u].size(); i++) {
      int v = e[u][i].first, w = e[u][i].second;
      if (d[u] < w) {
        continue;
      }
      if (d[u] + a[v] - w > d[v] && visited[v] == 0) {
        d[v] = d[u] + a[v] - w;
        Q.push(make_pair(d[v], v));
      }
    }
  }
  return (d[n] != 0);
}
void Solve() {
  int l = 0, r = (int)1e9;
  int res = inf;
  while (l < r) {
    int mid = (l + r) >> 1;
    if (Dijsktra(mid)) {
      res = mid;
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  cout << res - 1 << endl;
}
int main() {
  Read();
  Init();
  Solve();
  return 0;
}
