#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5 + 1;
int n, q;
int par[MAXN][20];
int a[MAXN];
int dep[MAXN];
long long len[MAXN];
long long sump[MAXN];
long long sums[MAXN];
struct _edge {
  int x, w;
  _edge(int x, int w) : x(x), w(w) {}
};
vector<_edge> edge[MAXN];
void dfs(int x, int p) {
  dep[x] = dep[p] + 1;
  sump[x] = a[x];
  for (_edge i : edge[x]) {
    if (i.x == p) continue;
    len[i.x] = len[x] + i.w;
    dfs(i.x, x);
    long long dis = max(0ll, sump[i.x] - (i.w << 1));
    sump[x] += dis;
    sums[i.x] += dis;
  }
}
void dfs2(int x, int p, long long v) {
  sump[x] += v;
  sums[x] += v;
  for (_edge i : edge[x]) {
    if (i.x == p) continue;
    long long dis = max(0ll, sump[i.x] - (i.w << 1));
    dfs2(i.x, x, max(0ll, sump[x] - dis - (i.w << 1)));
  }
}
void dfs3(int x, int p) {
  sump[x] += sump[p];
  sums[x] += sums[p];
  par[x][0] = p;
  for (int i = 1; i < 20; ++i) {
    par[x][i] = par[par[x][i - 1]][i - 1];
  }
  for (_edge i : edge[x]) {
    if (i.x == p) continue;
    dfs3(i.x, x);
  }
}
int lca(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  for (int i = 20; i--;) {
    if ((dep[x] - dep[y]) >> i) x = par[x][i];
  }
  if (x == y) return x;
  for (int i = 20; i--;) {
    if (par[x][i] != par[y][i]) {
      x = par[x][i];
      y = par[y][i];
    }
  }
  return par[x][0];
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
  }
  for (int i = 1; i < n; ++i) {
    int x, y, w;
    scanf("%d%d%d", &x, &y, &w);
    edge[x].emplace_back(y, w);
    edge[y].emplace_back(x, w);
  }
  dfs(1, 0);
  dfs2(1, 0, 0);
  dfs3(1, 0);
  while (q--) {
    int x, y, p;
    scanf("%d%d", &x, &y);
    p = lca(x, y);
    long long vs = sump[x] + sump[y] - sump[par[p][0]] - sump[p];
    long long es = sums[x] + sums[y] - (sums[p] << 1);
    long long ls = len[x] + len[y] - (len[p] << 1);
    printf("%lld\n", vs - es - ls);
  }
  return 0;
}
