#include <bits/stdc++.h>
using namespace std;
const int N = 300100;
int tp[N], fa[N], dp[N], hc[N], sz[N], tf[N], n, q;
long long a[N], sum[N], f[N], tmp[N];
int lca(int x, int y) {
  for (; tp[x] != tp[y]; x = fa[tp[x]])
    if (dp[tp[x]] < dp[tp[y]]) swap(x, y);
  return dp[x] < dp[y] ? x : y;
}
vector<pair<int, int> > g[N];
void dfs(int x) {
  for (auto i : g[x])
    if (i.first != fa[x]) {
      fa[i.first] = x;
      dp[i.first] = dp[x] + 1;
      tf[i.first] = i.second;
      dfs(i.first);
      sz[x] += sz[i.first];
      if (sz[i.first] > sz[hc[x]]) hc[x] = i.first;
      a[x] += sum[i.first];
    }
  sz[x] += !sz[x];
  sum[x] = max(0ll, a[x] - 2 * tf[x]);
}
void dfs2(int x, int y) {
  tp[x] = y;
  f[x] = f[fa[x]] + a[fa[x]] - sum[x] - tf[x];
  tmp[x] = max(0ll, tmp[fa[x]] + a[fa[x]] - sum[x] - 2 * tf[x]);
  if (hc[x]) dfs2(hc[x], y);
  for (auto i : g[x])
    if (!tp[i.first]) dfs2(i.first, i.first);
  tmp[x] -= f[x];
  f[x] += a[x];
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i < n; ++i) {
    int x, y, z;
    cin >> x >> y >> z;
    g[x].emplace_back(y, z);
    g[y].emplace_back(x, z);
  }
  dfs(1);
  dfs2(1, 1);
  for (; q-- > 0;) {
    int x, y, z;
    cin >> x >> y;
    z = lca(x, y);
    cout << (f[x] + f[y] - f[z] + tmp[z]) << '\n';
  }
  return 0;
}
