#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long d;
  cin >> d;
  long long a[n];
  a[0] = 0;
  for (int i = 1; i < n - 1; i++) cin >> a[i];
  long long x[n], y[n];
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  long long di[n][n];
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      di[i][j] = di[j][i] = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * d;
  long long lo = 0, hi = 2000000001;
  long long ans = hi;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    long long v[n];
    v[0] = mid;
    for (int i = 1; i < n; i++) v[i] = -1;
    for (int ii = 1; ii < n; ii++) {
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          if (i == j) continue;
          if (v[i] != -1 && (v[i] - di[i][j]) >= 0) {
            v[j] = max(v[j], v[i] + a[j] - di[i][j]);
          }
        }
      }
    }
    if (v[n - 1] >= 0) {
      ans = min(ans, mid);
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  cout << ans << endl;
}
