#include <bits/stdc++.h>
using namespace std;
void scanint(int &x) {
  int c = getchar_unlocked();
  x = 0;
  while (((c < 48 || c > 57))) c = getchar_unlocked();
  for (; c > 47 && c < 58; c = getchar_unlocked()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
}
const int N = 3e5 + 400, LOGN = 19;
int n, q, a[N], dpLCA[LOGN][N], kraw[N], dist[N];
vector<pair<int, int> > G[N];
long long dp[N], dp2[N], odl[N], pom[N], sumek[N];
int LCA(int a, int b) {
  if (dist[a] < dist[b]) swap(a, b);
  int d = dist[a] - dist[b];
  for (int i = 0; i < LOGN; i++)
    if (d & (1 << i)) a = dpLCA[i][a];
  if (a == b) return a;
  for (int i = LOGN - 1; i >= 0; i--) {
    if (dpLCA[i][a] != dpLCA[i][b]) {
      a = dpLCA[i][a];
      b = dpLCA[i][b];
    }
  }
  return dpLCA[0][a];
}
void preDFS(int u) {
  dp[u] = a[u];
  for (auto v : G[u]) {
    if (v.first != dpLCA[0][u]) {
      dpLCA[0][v.first] = u;
      dist[v.first] = dist[u] + 1;
      odl[v.first] = odl[u] + v.second;
      kraw[v.first] = v.second;
      preDFS(v.first);
      pom[v.first] = max(0LL, dp[v.first] - 2 * v.second);
      dp[u] += pom[v.first];
    }
  }
}
void preDP(int u) {
  dp2[u] = dp[u] + (u != 1 ? max(0LL, dp[dpLCA[0][u]] - 2 * kraw[u]) : 0);
  for (auto v : G[u]) {
    if (v.first != dpLCA[0][u]) {
      long long pomek = dp[u];
      dp[u] = dp2[u] - pom[v.first];
      sumek[v.first] = sumek[u] + dp[v.first] - pom[v.first];
      preDP(v.first);
      dp[u] = pomek;
    }
  }
}
int32_t main() {
  scanint(n);
  scanint(q);
  for (int i = 1; i <= n; i++) scanint(a[i]);
  for (int i = 1; i < n; i++) {
    int a, b, c;
    scanint(a);
    scanint(b);
    scanint(c);
    G[a].push_back({b, c});
    G[b].push_back({a, c});
  }
  dpLCA[0][1] = 1;
  preDFS(1);
  for (int i = 1; i < LOGN; i++)
    for (int j = 1; j <= n; j++) dpLCA[i][j] = dpLCA[i - 1][dpLCA[i - 1][j]];
  sumek[1] = dp[1];
  preDP(1);
  while (q--) {
    int a, b;
    scanint(a);
    scanint(b);
    int u = LCA(a, b);
    long long wynik = sumek[a] + sumek[b] - 2 * sumek[u] - odl[a] - odl[b] +
                      2 * odl[u] + dp[u];
    if (u != 1) wynik += max(0LL, dp2[dpLCA[0][u]] - pom[u] - 2 * kraw[u]);
    printf("%lld\n", wynik);
  }
  getchar();
  getchar();
  return 0;
}
