#include <bits/stdc++.h>
using namespace std;
inline long long mod(long long n, long long MOD = (long long)(1e9 + 7)) {
  return (n % MOD + MOD) % MOD;
}
inline long long gcd(long long a, long long b) {
  return (b == 0LL) ? a : gcd(b, a % b);
}
inline long long modPow(long long a, long long b,
                        long long MOD = (long long)(1e9 + 7)) {
  long long ret = 1LL;
  while (b > 0LL) {
    if (b & 1) ret = mod(ret * a, MOD);
    a = mod(a * a, MOD);
    b >>= 1;
  }
  return ret;
}
inline bool leapYear(int year) {
  return (year % 400 == 0) || (year % 100 != 0 && year % 4 == 0);
}
int a[102];
int x[102], y[102];
int g[102][102];
bool check(int bought, int n) {
  int tm[n];
  memset((tm), -1, sizeof(tm));
  tm[0] = bought;
  set<pair<int, int> > st;
  st.insert(make_pair(tm[0], 0));
  while (!st.empty()) {
    int current = st.rbegin()->first;
    int vertex = st.rbegin()->second;
    st.erase(make_pair(current, vertex));
    for (int i = (1); i < (n); i++) {
      if (i == vertex) continue;
      int nw = current - g[vertex][i];
      if (nw < 0) continue;
      nw += a[i];
      if (nw > tm[i]) {
        if (st.count(make_pair(tm[i], i))) st.erase(make_pair(tm[i], i));
        tm[i] = nw;
        st.insert(make_pair(tm[i], i));
      }
    }
  }
  return tm[n - 1] != -1;
}
int main() {
  int n, d;
  scanf("%d %d", &n, &d);
  for (int i = (1); i < (n - 1); i++) scanf("%d", a + i);
  for (int i = (0); i < ((n)); i++) scanf("%d %d", x + i, y + i);
  for (int i = (0); i < ((n)); i++)
    for (int j = (0); j < ((n)); j++)
      g[i][j] = d * (abs(x[i] - x[j]) + abs(y[i] - y[j]));
  int lo = 0, hi = (int)(1e9);
  while (lo < hi) {
    int mid = (lo + hi) >> 1;
    if (check(mid, n))
      hi = mid;
    else
      lo = mid + 1;
  }
  printf("%d\n", lo);
  return 0;
}
