#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e2 + 5;
const long long INF = 1e13;
const int MOD = 1e9 + 7;
int n;
pair<int, int> cords[MAXN];
long long cost[MAXN][MAXN], d;
long long arr[MAXN], dp[MAXN];
long long dist_between(int a, int b) {
  return abs(cords[a].first - cords[b].first) * d +
         abs(cords[a].second - cords[b].second) * d;
}
bool check(long long ini) {
  dp[1] = ini;
  for (int i = 2; i <= n; i++) dp[i] = -INF;
  for (int i = 2; i <= n; i++)
    for (int j = 1; j < i; j++) dp[i] = max(dp[i], dp[j] + arr[i] - cost[i][j]);
  for (int i = n - 1; i > 0; i--)
    for (int j = i + 1; j <= n; j++)
      dp[i] = max(dp[i], dp[j] + arr[i] - cost[i][j]);
  for (int i = 2; i <= n; i++)
    for (int j = 1; j < i; j++) dp[i] = max(dp[i], dp[j] + arr[i] - cost[i][j]);
  for (int i = n - 1; i > 0; i--)
    for (int j = i + 1; j <= n; j++)
      dp[i] = max(dp[i], dp[j] + arr[i] - cost[i][j]);
  for (int i = 2; i <= n; i++)
    for (int j = 1; j < i; j++) dp[i] = max(dp[i], dp[j] + arr[i] - cost[i][j]);
  for (int i = n - 1; i > 0; i--)
    for (int j = i + 1; j <= n; j++)
      dp[i] = max(dp[i], dp[j] + arr[i] - cost[i][j]);
  for (int i = 2; i <= n; i++)
    for (int j = 1; j < i; j++) dp[i] = max(dp[i], dp[j] + arr[i] - cost[i][j]);
  return dp[n] >= 0;
}
int main() {
  scanf("%d %lld", &n, &d);
  for (int i = 2; i < n; i++) scanf("%lld", &arr[i]);
  for (int i = 1; i <= n; i++)
    scanf("%d %d", &cords[i].first, &cords[i].second);
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      cost[i][j] = cost[j][i] = dist_between(i, j);
  long long l = 0, r = INF, res = 0;
  while (l <= r) {
    long long mid = l + r >> 1;
    if (check(mid))
      res = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%lld", res);
  return 0;
}
