#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 4e5 + 5;
int n, q, tot;
int c[N], head[N], ver[N], edge[N], nxt[N], dep[N];
int dp[N][21], f[N][21], cost[N][21];
void add(int x, int y, int z) {
ver[++tot] = y, edge[tot] = z, nxt[tot] = head[x], head[x] = tot;
}
void dfs1(int x, int fa) {
dep[x] = dep[fa] + 1, f[x][0] = fa;
for (int i = head[x]; i; i = nxt[i]) {
int y = ver[i], z = edge[i];
if (y == fa) continue;
dfs1(y, x);
cost[y][0] = z, dp[x][0] = max(dp[x][0], dp[y][0] - 2 * z);
}
}
void bfs() {
queue<int> q; q.push(1);
while (!q.empty()) {
int x = q.front(); q.pop();
for (int i = head[x]; i; i = nxt[i]) {
int y = ver[i], z = edge[i];
if (y == f[x][0]) continue;
dp[y][0] = max(dp[y][0], dp[x][0] - 2 * z);
q.push(y);
}
}
}
void init() {
dfs1(1, 1); bfs();
for (int j = 1; j <= 20; j++)
for (int i = 1; i <= n; i++) {
f[i][j] = f[f[i][j - 1]][j - 1];
cost[i][j] = cost[i][j - 1] + cost[f[i][j - 1]][j - 1];
dp[i][j] = max(dp[i][j - 1], dp[f[i][j - 1]][j - 1]);
}
}
int lca(int x, int y) {
int ans = c[x] + c[y], mx = max(dp[x][0], dp[x][0]);
if (dep[x] < dep[y]) swap(x, y);
for (int i = 20; i; i--)
if (dep[f[x][i]] >= dep[y])
ans -= cost[x][i], mx = max(mx, dp[x][i]), x = f[x][i];
for (int i = 20; i; i--)
if (f[x][i] != f[y][i]) {
ans -= cost[x][i] + cost[y][i];
mx = max(mx, max(dp[x][i], dp[y][i]));
x = f[x][i], y = f[y][i];
}
if (x != y) {
ans -= cost[x][0] + cost[y][0];
mx = max(mx, max(dp[x][0], dp[y][0]));
x = f[x][0], y = f[y][0];
}
mx = max(mx, dp[x][0]);
return ans + mx;
}
signed main() {
memset(dp, -0x3f, sizeof(dp));
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
cin >> n >> q;
for (int i = 1; i <= n; i++) {
int x; cin >> x;
c[i] = dp[i][0] = x;
}
for (int i = 1; i < n; i++) {
int x, y, z; cin >> x >> y >> z;
add(x, y, z); add(y, x, z);
}
init();
while (q--) {
int x, y; cin >> x >> y;
cout << lca(x, y) << endl;
}
return 0;
}