#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 2e9;
const long long INFLL = 1e18;
const int MAX_N = 300000;
const int MAX_K = 20;
int N, Q;
long long cost[MAX_N + 1];
vector<pair<int, int> > gp[MAX_N + 1];
long long dp1[MAX_N + 1], dp2[MAX_N + 1][MAX_K + 1], dp3[MAX_N + 1];
long long c2[MAX_N + 1];
int up[MAX_N + 1][MAX_K + 1], lv[MAX_N + 1], p[MAX_N + 1];
void dfs(int x) {
  up[x][0] = p[x];
  for (int i = 1; i < MAX_K; i++) {
    up[x][i] = up[up[x][i - 1]][i - 1];
  }
  dp1[x] += cost[x];
  for (pair<int, int> i : gp[x]) {
    if (i.first == p[x]) continue;
    p[i.first] = x;
    c2[i.first] = (long long)i.second;
    lv[i.first] = lv[x] + 1;
    dfs(i.first);
    dp1[x] += max(0LL, dp1[i.first] - (long long)i.second * 2LL);
  }
}
void dfs2(int x) {
  int y = x;
  dp2[x][0] = dp1[x] - c2[x];
  for (int i = 1; i < MAX_K; i++) {
    dp2[x][i] = dp2[x][i - 1] + dp2[p[y]][i - 1] -
                max(0LL, dp1[y] - (long long)c2[y] * 2LL);
    y = up[y][i - 1];
  }
  for (pair<int, int> i : gp[x]) {
    if (i.first == p[x]) continue;
    dp3[i.first] =
        max(0LL, dp1[x] + dp3[x] -
                     max(0LL, dp1[i.first] - (long long)i.second * 2LL) -
                     (long long)i.second * 2LL);
    dfs2(i.first);
  }
}
int lca(int x, int y) {
  for (int i = MAX_K - 1; i >= 0; i--) {
    if (lv[up[x][i]] >= lv[y]) {
      x = up[x][i];
    }
    if (lv[up[y][i]] >= lv[x]) {
      y = up[y][i];
    }
  }
  if (x == y) return x;
  for (int i = MAX_K - 1; i >= 0; i--) {
    if (up[x][i] != up[y][i]) {
      x = up[x][i];
      y = up[y][i];
    }
  }
  return up[x][0];
}
long long calc(int x, int y) {
  long long ret = 0;
  int z = -1;
  for (int i = MAX_K - 1; i >= 0; i--) {
    if (lv[up[x][i]] >= lv[y]) {
      ret += dp2[x][i];
      if (z == -1) {
        z = x;
        for (int j = 0; j < i; j++) z = up[z][j];
      } else {
        z = up[z][i];
      }
      ret -= max(0LL, dp1[z] - (long long)c2[z] * 2LL);
      x = up[x][i];
    }
  }
  return ret;
}
int main() {
  scanf("%d%d", &N, &Q);
  for (int i = 1; i <= N; i++) {
    scanf("%lld", &cost[i]);
  }
  for (int i = 1; i < N; i++) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    gp[a].push_back({b, c});
    gp[b].push_back({a, c});
  }
  lv[1] = 1;
  dfs(1);
  dfs2(1);
  for (int i = 1; i <= N; i++) {
  }
  for (int i = 1; i <= Q; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    int l = lca(a, b);
    printf("%lld\n", calc(a, l) + calc(b, l) + dp1[l] + dp3[l]);
  }
  return 0;
}
