#include <bits/stdc++.h>
using namespace std;
const int maxN = 111;
int n, d, dd[maxN], kc[maxN][maxN], cost[maxN], x[maxN], y[maxN], ans;
queue<int> Q;
bool ok(int s) {
  for (int i = 2; i <= n; i++) dd[i] = 0;
  while (!Q.empty()) Q.pop();
  dd[1] = s;
  Q.push(1);
  while (!Q.empty()) {
    int start = Q.front();
    Q.pop();
    for (int i = 1; i <= n; i++) {
      if (i == start) continue;
      if (dd[start] - kc[i][start] * d < 0) continue;
      if (i == n) return true;
      if (dd[start] - kc[i][start] * d + cost[i] > dd[i]) {
        dd[i] = dd[start] - kc[i][start] * d + cost[i];
        Q.push(i);
      }
    }
  }
  return false;
}
int main() {
  cin >> n >> d;
  for (int i = 2; i <= n - 1; i++) cin >> cost[i];
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) kc[i][j] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  int low = 1, high = 1000000007, mid;
  while (low <= high) {
    int mid = (low + high) / 2;
    if (ok(mid)) {
      ans = mid;
      high = mid - 1;
    } else
      low = mid + 1;
  }
  cout << ans;
}
