#include <bits/stdc++.h>
using namespace std;
long long a[333333], s[333333];
struct edge {
  unsigned p, u, v;
  long long w, s;
} es[333333 << 1];
unsigned eh[333333], ec;
void adde(unsigned u, unsigned v, long long w) {
  es[ec] = {eh[u], u, v, w, 0};
  eh[u] = ec++;
  es[ec] = {eh[v], v, u, w, 0};
  eh[v] = ec++;
}
void dfs1(unsigned u, unsigned f) {
  for (unsigned ei = eh[u]; ~ei; ei = es[ei].p) {
    edge& e = es[ei];
    if (e.v == f) continue;
    dfs1(e.v, u);
    s[u] += e.s = max(0ll, s[e.v] + a[e.v] - 2 * e.w);
  }
}
void dfs2(unsigned u, unsigned f) {
  for (unsigned ei = eh[u]; ~ei; ei = es[ei].p) {
    edge e = es[ei];
    if (e.v == f) continue;
    s[e.v] += es[ei ^ 1].s = max(0ll, s[u] + a[u] - 2 * e.w - e.s);
    dfs2(e.v, u);
  }
}
unsigned d[333333], mp[333333][20];
long long ms[333333][20];
void dfs3(unsigned u, unsigned f) {
  d[u] = d[f] + 1;
  mp[u][0] = f;
  for (unsigned ei = eh[u]; ~ei; ei = es[ei].p) {
    edge e = es[ei];
    if (e.v == f) continue;
    ms[e.v][0] = s[e.v] - e.s - es[ei ^ 1].s + a[e.v] - e.w;
    dfs3(e.v, u);
  }
}
long long lca(unsigned u, unsigned v) {
  long long res = 0;
  if (d[u] < d[v]) swap(u, v);
  for (unsigned i = 0; d[u] - d[v] >> i; ++i)
    if ((d[u] - d[v] >> i) & 1) {
      res += ms[u][i];
      u = mp[u][i];
    }
  if (u == v) return res + s[u] + a[u];
  for (unsigned i = 19; ~i; --i)
    if (mp[u][i] != mp[v][i]) {
      res += ms[u][i] + ms[v][i];
      u = mp[u][i];
      v = mp[v][i];
    }
  return res + s[mp[u][0]] + a[mp[u][0]] + ms[u][0] + ms[v][0];
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  unsigned n, q;
  cin >> n >> q;
  for (unsigned i = 1; i <= n; ++i) cin >> a[i];
  memset(eh, 0xff, sizeof(eh));
  for (unsigned i = 1; i < n; ++i) {
    unsigned u, v;
    long long w;
    cin >> u >> v >> w;
    adde(u, v, w);
  }
  dfs1(1, 0);
  dfs2(1, 0);
  dfs3(1, 0);
  for (unsigned j = 1; j != 20; ++j)
    for (unsigned i = 1; i <= n; ++i) {
      mp[i][j] = mp[mp[i][j - 1]][j - 1];
      ms[i][j] = ms[i][j - 1] + ms[mp[i][j - 1]][j - 1];
    }
  while (q--) {
    unsigned u, v;
    cin >> u >> v;
    cout << lca(u, v) << endl;
  }
  return 0;
}
