#include <bits/stdc++.h>
using namespace std;
int n, q;
int a[300010];
struct Edge {
  int v, c, nxt;
} e[600010];
int tot;
int first[300010];
void build(int u, int v, int c) {
  e[++tot] = (Edge){v, c, first[u]};
  first[u] = tot;
  return;
}
int dep[300010];
long long f[300010];
long long g[300010];
long long sum[300010];
const int M = 20;
int fa[300010][M];
void dfs1(int u, int lst) {
  dep[u] = dep[lst] + 1;
  fa[u][0] = lst;
  for (int i = 1; i < M; i++) fa[u][i] = fa[fa[u][i - 1]][i - 1];
  f[u] = 0;
  for (int i = first[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == lst) continue;
    dfs1(v, u);
    f[u] += max(0ll, f[v] + a[v] - 2ll * e[i].c);
  }
  return;
}
void dfs2(int u, int lst) {
  sum[u] += a[u] + f[u];
  for (int i = first[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == lst) continue;
    long long val = max(0ll, f[v] + a[v] - 2ll * e[i].c);
    g[v] = max(0ll, f[u] + g[u] - val + a[u] - 2ll * e[i].c);
    sum[v] += sum[u] - val - e[i].c;
    dfs2(v, u);
  }
  return;
}
int getlca(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  int need = dep[u] - dep[v], now = 0;
  while (need) {
    if (need & 1) u = fa[u][now];
    need >>= 1;
    now++;
  }
  if (u == v) return u;
  for (int i = M - 1; i >= 0; i--)
    if (fa[u][i] != fa[v][i]) u = fa[u][i], v = fa[v][i];
  return fa[u][0];
}
long long solve(int u, int v) {
  int lca = getlca(u, v);
  return sum[u] + sum[v] - 2 * sum[lca] + f[lca] + g[lca] + a[lca];
}
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++) {
    int u, v, c;
    scanf("%d %d %d", &u, &v, &c);
    build(u, v, c);
    build(v, u, c);
  }
  dfs1(1, 0);
  dfs2(1, 0);
  while (q--) {
    int u, v;
    scanf("%d %d", &u, &v);
    printf("%lld\n", solve(u, v));
  }
  return 0;
}
