#include <bits/stdc++.h>
using namespace std;
const int INF = (-1u) / 2;
const long long int INF2 = (-1ull) / 2;
int a, b, i, j, k, n, m, timer = 0, l, r, x, y, dd, us[10020];
int c[1011000], cnt = 0, fl = 0, a2, a3 = -1000000, ans = 0, d[10020];
pair<int, int> p[1002];
void dfs(int v, int sl) {
  if (us[i] && d[v] > sl) return;
  d[v] = sl;
  us[v] = 1;
  sl += c[v];
  for (int i = 1; i <= n; i++) {
    if (i == v) continue;
    if (sl >=
        (abs(p[v].first - p[i].first) + abs(p[v].second - p[i].second)) * dd) {
      if (us[i] && d[i] >= sl - ((abs(p[v].first - p[i].first) +
                                  abs(p[v].second - p[i].second)) *
                                 dd)) {
        continue;
      } else {
        d[i] =
            sl -
            ((abs(p[v].first - p[i].first) + abs(p[v].second - p[i].second)) *
             dd);
        dfs(i, sl - ((abs(p[v].first - p[i].first) +
                      abs(p[v].second - p[i].second)) *
                     dd));
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> dd;
  for (i = 2; i < n; i++) cin >> c[i];
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    p[i + 1] = make_pair(a, b);
  }
  l = 0;
  r = abs(p[n].first - p[1].first) + abs(p[n].second - p[1].second);
  r *= dd;
  r++;
  while (l < r) {
    m = (l + r) / 2;
    for (i = 1; i <= n; i++) us[i] = d[i] = 0;
    dfs(1, m);
    if (us[n])
      r = m;
    else
      l = m + 1;
  }
  cout << r << endl;
  return 0;
}
