#include <bits/stdc++.h>
using namespace std;
int a[103];
int pts[102][2];
long long int m[102][102], inf = LLONG_MAX;
long long int dis[102];
int n, d;
queue<int> q;
bool chck(long long int start_money) {
  for (int i = 0; i <= n; i++) dis[i] = -1;
  dis[1] = start_money;
  q.push(1);
  while (!q.empty()) {
    int par = q.front();
    q.pop();
    for (int i = 2; i <= n; i++) {
      if (par == i) continue;
      if (m[par][i] > dis[par]) continue;
      int cur = dis[par] - m[par][i] + a[i];
      if (cur > dis[i]) dis[i] = cur, q.push(i);
    }
  }
  return dis[n] != -1;
}
int main() {
  scanf("%d%d", &n, &d);
  for (int i = 2; i <= n - 1; i++) scanf("%d", a + i);
  for (int i = 1; i <= n; i++) scanf("%d%d", &pts[i][0], &pts[i][1]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      m[i][j] = d * (abs(pts[i][0] - pts[j][0]) + abs(pts[i][1] - pts[j][1]));
  long long int l = 0, r = 100000000, mid, ans;
  while (l <= r) {
    mid = (l + r) / 2;
    if (chck(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  cout << ans;
  return 0;
}
