#include <bits/stdc++.h>
using namespace std;
struct edge {
  int from, to, dist;
};
vector<edge> edges;
const int maxn = 4e5 + 233;
int f[maxn][21];
long long dp[maxn][3];
long long v_sum[maxn], e_sum[maxn];
long long sum[maxn][3];
int d[maxn];
vector<int> G[maxn];
int n, q;
int a[maxn];
void addedge(int from, int to, int dist) {
  edges.push_back(edge{from, to, dist});
  G[from].emplace_back(edges.size() - 1);
}
int lca(int x, int y) {
  if (d[x] > d[y]) swap(x, y);
  for (int i = 20; i >= 0; i--) {
    if (d[f[y][i]] >= d[x]) y = f[y][i];
  }
  if (x == y) return x;
  for (int i = 20; i >= 0; i--) {
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  }
  return f[x][0];
}
void dfs1(int u, int fa) {
  d[u] = d[fa] + 1;
  f[u][0] = fa;
  v_sum[u] = v_sum[fa] + a[u];
  dp[u][0] = a[u];
  for (int i = 1; i <= 20; i++) {
    f[u][i] = f[f[u][i - 1]][i - 1];
  }
  for (int i = 0; i < G[u].size(); i++) {
    edge &e = edges[G[u][i]];
    if (e.to == fa) continue;
    e_sum[e.to] = e_sum[u] + e.dist;
    dfs1(e.to, u);
    dp[u][0] += max(0ll, dp[e.to][0] - 2 * e.dist);
  }
}
void dfs2(int u, int fa, long long t1, long long t2) {
  long long r1 = 0, r2 = a[u];
  dp[u][1] = t1;
  dp[u][2] = t2;
  for (int i = 0; i < 3; i++) {
    sum[u][i] = sum[fa][i] + dp[u][i];
  }
  for (int i = 0; i < G[u].size(); i++) {
    edge &e = edges[G[u][i]];
    if (e.to == fa) continue;
    r1 += max(0ll, dp[e.to][0] - 2 * e.dist);
    r2 += max(0ll, dp[e.to][0] - 2 * e.dist);
  }
  for (int i = 0; i < G[u].size(); i++) {
    edge &e = edges[G[u][i]];
    if (e.to == fa) continue;
    r1 -= max(0ll, dp[e.to][0] - 2 * e.dist);
    r2 -= max(0ll, dp[e.to][0] - 2 * e.dist);
    dfs2(e.to, u, max(0ll, r1), max(0ll, r2 + t2 - 2 * e.dist));
    r1 += max(0ll, dp[e.to][0] - 2 * e.dist);
    r2 += max(0ll, dp[e.to][0] - 2 * e.dist);
  }
}
long long cal(int x, int y) {
  return sum[x][1] - sum[y][1] + dp[x][0] + dp[y][2] + v_sum[f[x][0]] -
         v_sum[f[y][0]] - (e_sum[x] - e_sum[y]);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> q;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (int i = 1; i < n; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    addedge(u, v, w);
    addedge(v, u, w);
  }
  dfs1(1, 0);
  dfs2(1, 0, 0, 0);
  while (q--) {
    int x, y;
    cin >> x >> y;
    if (d[x] < d[y]) swap(x, y);
    int lc = lca(x, y);
    long long res = 0;
    if (y != lc) {
      res = cal(x, lc) + cal(y, lc);
      res -= dp[lc][2] + a[lc];
      for (int i = 0; i < G[lc].size(); i++) {
        edge &e = edges[G[lc][i]];
        if (e.to == f[lc][0]) continue;
        res -= max(0ll, dp[e.to][0] - 2 * e.dist);
      }
    } else
      res = cal(x, lc);
    cout << res << "\n";
  }
  return 0;
}
