#include <bits/stdc++.h>
using namespace std;
int x[110], y[110];
int adj[110][110], deg[110];
int a[110];
int dis[110], N, D;
queue<int> q;
int _abs(int t) {
  if (t < 0) return -t;
  return t;
}
int man(int i, int j) { return _abs(x[i] - x[j]) + _abs(y[i] - y[j]); }
bool can(int m) {
  int u, v, val;
  memset(dis, -1, sizeof(dis));
  dis[1] = m;
  q = queue<int>();
  q.push(1);
  while (!q.empty()) {
    u = q.front();
    q.pop();
    for (int i = 0; i < deg[u]; i++) {
      v = adj[u][i];
      if (man(u, v) * D > dis[u]) continue;
      val = dis[u] - man(u, v) * D + a[v];
      if (dis[v] < val) {
        dis[v] = val;
        q.push(v);
      }
    }
  }
  if (dis[N] == -1) return false;
  return true;
}
int main() {
  int f, s, m;
  scanf("%d%d", &N, &D);
  for (int i = 2; i < N; i++) scanf("%d", a + i);
  for (int i = 1; i <= N; i++) scanf("%d%d", x + i, y + i);
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= N; j++) {
      if (i == j) continue;
      adj[i][deg[i]++] = j;
    }
  f = -1;
  s = 1000000000;
  while (s - f > 1) {
    m = (s + f) >> 1;
    if (can(m))
      s = m;
    else
      f = m;
  }
  printf("%d\n", s);
  return 0;
}
