#include <bits/stdc++.h>
using namespace std;
const int MAXN = 101;
const long long INF = 1000000000000000000;
int N;
long long D;
long long A[MAXN];
long long x[MAXN], y[MAXN];
bool visited[MAXN];
long long cost[MAXN];
inline long long get_distance(int i, int j) {
  long long a = (long long)abs(x[i] - x[j]);
  long long b = (long long)abs(y[i] - y[j]);
  return (long long)(D * (a + b));
}
bool ok(long long money) {
  memset(visited, false, sizeof(visited));
  memset(cost, -1, sizeof(cost));
  priority_queue<pair<long long, int> > q;
  q.push(make_pair(money, 1));
  cost[1] = money;
  while (!q.empty()) {
    long long sum = +q.top().first;
    int node = +q.top().second;
    q.pop();
    visited[node] = true;
    sum += A[node];
    for (int n = 1; n <= N; n++) {
      long long F = sum - get_distance(node, n);
      if (!visited[n] && F >= 0 && cost[n] < F) {
        cost[n] = F;
        q.push(make_pair(cost[n], n));
      }
    }
  }
  return visited[N];
}
int main() {
  scanf("%d %I64d", &N, &D);
  for (int n = 2; n < N; n++) scanf("%I64d", &A[n]);
  for (int n = 1; n <= N; n++) scanf("%I64d %I64d", &x[n], &y[n]);
  long long res = -1;
  long long low = 1, high = INF;
  while (low <= high) {
    long long mid = (low + high) / 2;
    if (ok(mid)) {
      res = mid;
      high = mid - 1;
    } else
      low = mid + 1;
  }
  printf("%I64d\n", res);
  return 0;
}
