#include <bits/stdc++.h>
using namespace std;
int n, q, a[300010], lv[300010], who[300010][20];
long long sub[300010], root[300010], len[300010], len2[300010];
vector<pair<int, int> > adj[300010];
vector<long long> dt[300010];
void dfs(int h, int p) {
  sub[h] = a[h];
  for (auto &it : adj[h])
    if (it.first != p) {
      lv[it.first] = lv[h] + 1;
      len[it.first] = len[h] + it.second;
      who[it.first][0] = h;
      for (int i = 1; i < 20; i++)
        who[it.first][i] = who[who[it.first][i - 1]][i - 1];
      dfs(it.first, h);
      if (sub[it.first] - 2 * it.second > 0) {
        sub[h] += sub[it.first] - 2 * it.second;
      }
    }
}
void dfs2(int h, int p) {
  root[h] = a[h];
  for (auto &it : adj[h]) {
    long long t = max(0LL, sub[it.first] - 2 * it.second);
    dt[h].push_back(t);
    root[h] += t;
  }
  len2[h] += root[h];
  for (int i = 0; i < adj[h].size(); i++)
    if (adj[h][i].first == p) len2[h] -= dt[h][i];
  for (int i = 0; i < adj[h].size(); i++) {
    int to = adj[h][i].first;
    if (to == p) continue;
    long long tmp = sub[h];
    sub[h] = root[h] - dt[h][i];
    len2[to] = len2[h] - dt[h][i];
    dfs2(to, h);
    sub[h] = tmp;
  }
}
int lca(int x, int y) {
  if (lv[x] < lv[y]) swap(x, y);
  for (int i = 20 - 1; i >= 0; i--)
    if (lv[x] - lv[y] >= (1 << i)) x = who[x][i];
  if (x == y) return x;
  for (int i = 20 - 1; i >= 0; i--)
    if (who[x][i] != who[y][i]) {
      x = who[x][i];
      y = who[y][i];
    }
  return who[x][0];
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 0; i < n - 1; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    adj[x].emplace_back(y, z);
    adj[y].emplace_back(x, z);
  }
  dfs(1, 0);
  root[1] = sub[1];
  dfs2(1, 0);
  for (int i = 0; i < q; i++) {
    int x, y, z;
    scanf("%d%d", &x, &y);
    z = lca(x, y);
    long long tlen = len[x] + len[y] - 2 * len[z];
    long long tlen2 = len2[x] + len2[y] - 2 * len2[z];
    printf("%lld\n", root[z] - tlen + tlen2);
  }
  return 0;
}
