#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
long long val[maxn], a[maxn], dp[maxn];
vector<pair<int, long long> > adj[maxn];
long long mp[maxn];
long long g[maxn];
inline void dfs0(int u, int f) {
  long long ans = 0;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i].first;
    long long w = adj[u][i].second;
    if (v == f) continue;
    dfs0(v, u);
    ans += max(0ll, dp[v] - w * 2);
  }
  dp[u] = a[u] + ans;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i].first;
    long long w = adj[u][i].second;
    if (v == f) continue;
    mp[v] = dp[u] - max(0ll, dp[v] - w * 2);
  }
}
int anc[maxn][21], dep[maxn];
long long sum[maxn][21];
inline void dfs1(int u, int fa) {
  anc[u][0] = fa;
  dep[u] = dep[fa] + 1;
  sum[u][0] = mp[u] - val[fa];
  for (int i = 1; i <= 20; i++) {
    anc[u][i] = anc[anc[u][i - 1]][i - 1];
    sum[u][i] = sum[anc[u][i - 1]][i - 1] + sum[u][i - 1];
  }
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i].first;
    long long w = adj[u][i].second;
    if (v == fa) continue;
    val[v] = w;
    dfs1(v, u);
  }
}
inline void dfs2(int u, int f) {
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i].first;
    long long w = adj[u][i].second;
    if (v == f) continue;
    g[v] = max(0ll, mp[v] + max(0ll, g[u] - val[u] * 2));
    dfs2(v, u);
  }
}
int n, m;
inline void init() {
  dfs0(1, 0);
  dfs1(1, 0);
  dfs2(1, 0);
}
inline int lca(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  for (int i = 20; i >= 0; i--) {
    if (dep[anc[u][i]] >= dep[v]) u = anc[u][i];
  }
  if (u == v) return u;
  for (int i = 20; i >= 0; i--) {
    if (anc[u][i] != anc[v][i]) {
      u = anc[u][i];
      v = anc[v][i];
    }
  }
  return anc[u][0];
}
inline long long work(int u, int v) {
  if (u == v) {
    return dp[u] + max(0ll, g[u] - val[u] * 2);
  }
  int z = lca(u, v);
  if (z == u || z == v) {
    if (z == u) swap(u, v);
    long long ans = 0;
    int cur = u;
    for (int i = 20; i >= 0; i--) {
      if (dep[anc[cur][i]] >= dep[z] + 1) {
        ans += sum[cur][i];
        cur = anc[cur][i];
      }
    }
    ans += dp[u] - val[u];
    ans += mp[cur] + max(0ll, g[z] - val[z] * 2);
    return ans;
  } else {
    long long ans = dp[u] - val[u] + dp[v] - val[v];
    for (int i = 20; i >= 0; i--) {
      if (dep[anc[u][i]] >= dep[z] + 1) {
        ans += sum[u][i];
        u = anc[u][i];
      }
      if (dep[anc[v][i]] >= dep[z] + 1) {
        ans += sum[v][i];
        v = anc[v][i];
      }
    }
    ans += dp[z] - max(0ll, dp[u] - val[u] * 2) - max(0ll, dp[v] - val[v] * 2) +
           max(0ll, g[z] - val[z] * 2);
    return ans;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    long long w;
    scanf("%d%d%lld", &u, &v, &w);
    adj[u].push_back(make_pair(v, w));
    adj[v].push_back(make_pair(u, w));
  }
  init();
  while (m--) {
    int u, v;
    scanf("%d%d", &u, &v);
    printf("%lld\n", work(u, v));
  }
}
