#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5;
long long n, m, a[N], pnt[N * 2], nxt[N * 2], val[N * 2], head[N], E;
long long down[N], up[N], far[N][20], dep[N], ad[N], dl[N];
long long infu[N], lth[N], sumv[N], sumd[N];
void add(long long u, long long v, long long w) {
  pnt[++E] = v;
  nxt[E] = head[u];
  val[E] = w;
  head[u] = E;
}
void sol_down(long long u, long long fa) {
  down[u] = a[u];
  for (long long i = head[u]; i; i = nxt[i]) {
    long long v = pnt[i];
    if (v == fa) continue;
    sol_down(v, u);
    if (down[v] - val[i] * 2 > 0) {
      down[u] += down[v] - val[i] * 2;
      infu[v] = down[v] - val[i] * 2;
    }
  }
}
void sol_up(long long u, long long fa) {
  sumd[u] = sumd[fa] + down[u];
  sumv[u] = sumv[fa] + a[u];
  infu[u] += infu[fa];
  for (long long i = head[u]; i; i = nxt[i]) {
    long long v = pnt[i];
    if (v == fa) continue;
    up[v] = max(up[u] + down[u] - infu[v] - val[i] * 2, 0ll);
    far[v][0] = u;
    dep[v] = dep[u] + 1;
    lth[v] = lth[u] + val[i];
    sol_up(v, u);
  }
}
long long LCA(long long u, long long v) {
  if (dep[u] < dep[v]) swap(u, v);
  long long dlt = dep[u] - dep[v];
  for (long long i = 19; i >= 0; --i)
    if (dlt & (1 << i)) u = far[u][i];
  if (u == v) return u;
  for (long long i = 19; i >= 0; --i)
    if (far[u][i] ^ far[v][i]) u = far[u][i], v = far[v][i];
  return far[u][0];
}
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  for (long long u, v, w, i = 2; i <= n; ++i) {
    scanf("%lld%lld%lld", &u, &v, &w);
    add(u, v, w);
    add(v, u, w);
  }
  sol_down(1, 0);
  sol_up(1, 0);
  for (long long i = 1; i < 20; ++i)
    for (long long u = 1; u <= n; ++u) far[u][i] = far[far[u][i - 1]][i - 1];
  long long u, v, lca, res;
  while (m-- > 0) {
    scanf("%lld%lld", &u, &v);
    if (u == v)
      res = down[u] + up[u];
    else {
      lca = LCA(u, v);
      res = 0;
      res += up[lca];
      res += sumd[u] - sumd[lca];
      res += sumd[v] - sumd[lca];
      res += down[lca];
      res -= infu[u] - infu[lca];
      res -= infu[v] - infu[lca];
      res -= lth[u] + lth[v] - lth[lca] * 2;
    }
    printf("%lld\n", res);
  }
  return 0;
}
