#include <bits/stdc++.h>
using namespace std;
const int size = 110;
const int inf = 0x3f3f3f3f;
int n, a;
int dp[size][size];
int var[size], x[size], y[size];
int Abs(int x) { return x > 0 ? x : -x; }
void init() { memset(dp, inf, sizeof(dp)); }
void work() {
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      dp[i][j] = dp[j][i] = (Abs(x[j] - x[i]) + Abs(y[j] - y[i])) * a;
    }
  }
}
void solve() {
  for (int k = 2; k < n; k++) {
    for (int i = 1; i < n; i++) {
      for (int j = 2; j <= n; j++) {
        if (i == j || i == k || j == k) continue;
        dp[i][j] = min(dp[i][j], dp[i][k] + dp[k][j] - var[k]);
      }
    }
  }
}
int main() {
  cin >> n >> a;
  var[1] = var[n] = 0;
  init();
  for (int i = 2; i <= n - 1; i++) {
    cin >> var[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
  }
  work();
  solve();
  cout << dp[1][n] << endl;
  return 0;
}
