#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 3e5 + 10;
long long N, M, cnt = -1, f[MAXN], g[MAXN], dep[MAXN], fa[MAXN][21],
                st[MAXN][21], head[MAXN], val[MAXN];
struct edge {
  long long nt, to, v;
} E[MAXN << 1];
void add(long long, long long, long long);
void pre(long long, long long);
void dfs(long long, long long);
long long calc(long long, long long);
int main() {
  memset(head, -1, sizeof(head));
  scanf("%lld%lld", &N, &M);
  for (long long i = 1; i <= N; i++) scanf("%lld", val + i);
  for (long long i = 1, x, y, v; i < N; i++) {
    scanf("%lld%lld%lld", &x, &y, &v);
    add(x, y, v), add(y, x, v);
  }
  pre(1, 0);
  dfs(1, 0);
  for (long long i = 1, x, y; i <= M; i++)
    scanf("%lld%lld", &x, &y), printf("%lld\n", calc(x, y));
  return 0;
}
long long calc(long long x, long long y) {
  if (dep[x] < dep[y]) swap(x, y);
  long long ret = 0, tem = f[x], dis = dep[x] - dep[y];
  for (long long i = 20; ~i; i--)
    if ((dis >> i) & 1) ret += st[x][i] - f[x], x = fa[x][i];
  if (x == y) return ret + tem + g[x];
  tem += f[y];
  for (long long i = 20; ~i; i--)
    if (fa[x][i] != fa[y][i])
      ret += st[x][i] - f[x], ret += st[y][i] - f[y], x = fa[x][i],
                                                      y = fa[y][i];
  return ret + st[x][0] + st[y][0] - f[x] - f[y] - f[fa[x][0]] + g[fa[x][0]] +
         tem;
}
void dfs(long long n, long long ff) {
  dep[n] = dep[ff] + 1, fa[n][0] = ff;
  for (long long i = 1; i <= 20; i++) {
    fa[n][i] = fa[fa[n][i - 1]][i - 1];
    st[n][i] = st[fa[n][i - 1]][i - 1] - f[fa[n][i - 1]] + st[n][i - 1];
  }
  for (long long i = head[n]; ~i; i = E[i].nt) {
    long long v = E[i].to;
    if (v == ff) continue;
    st[v][0] = f[n] + f[v] - E[i].v;
    if (f[v] - 2 * E[i].v > 0) st[v][0] -= f[v] - 2 * E[i].v;
    g[v] = max(g[v], g[n] + st[v][0] - E[i].v - f[v]);
    dfs(v, n);
  }
}
void pre(long long n, long long ff) {
  f[n] = val[n];
  for (long long i = head[n]; ~i; i = E[i].nt) {
    long long v = E[i].to;
    if (v == ff) continue;
    pre(v, n);
    f[n] += max(0LL, f[v] - E[i].v * 2);
  }
}
void add(long long x, long long y, long long v) {
  cnt++;
  E[cnt].to = y;
  E[cnt].nt = head[x];
  head[x] = cnt;
  E[cnt].v = v;
}
