7 3
1 4 7
1 2 2
2 3 3
3 4 8
2 5 1
1 6 4
6 7 5
 10 2
1 5
5 3 2
8 4 8
7 6 9
7 10 1
10 1 4
9 5 1
5 8 2
7 2 9
6 5 6
 10 5
4 8 7 5 1
5 1 1
2 7 1
4 3 1
10 9 1
10 1 1
1 8 1
10 7 1
10 3 1
7 6 1
 10 9
9 7 6 10 3 5 2 8 1
9 4 10
10 8 3
3 6 2
5 1 8
5 2 5
1 10 10
6 7 1
9 1 7
1 6 3
 10 5
8 5 2 10 1
3 1 7
5 4 6
10 8 4
6 8 9
7 8 4
9 5 6
8 1 9
2 10 2
9 8 7

3 2
 2 3
 5 1
 0 1
 5 1

#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, m, u1[N], u2[N], v[N], s[N], q[N], ql = 1, qr, rt, ma, p[N], w[N], nu[N],
                                          df, MA, ans, pre[N], h[N], f[N], D[N];
void R(int &x) {
  x = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
}
struct E {
  int l, to, w;
} e[N << 1];
struct P {
  int sn, w;
} ll[2][N], g[3];
void se(int x, int f) {
  for (int i = h[x]; i; i = e[i].l) {
    const int to = e[i].to;
    if (to == f) continue;
    se(to, x);
    const int k = ll[0][to].w + e[i].w;
    if (k > ll[0][x].w) {
      ll[1][x] = ll[0][x];
      ll[0][x] = (P){to, k};
    } else if (k > ll[1][x].w)
      ll[1][x] = (P){to, k};
  }
  (ll[1][x].w + ll[0][x].w > ma) && (ma = ll[1][x].w + ll[0][x].w) && (rt = x);
}
void dfs(int x) {
  nu[++df] = p[x] = x;
  for (int i = h[x]; i; i = e[i].l) {
    int to = e[i].to;
    if (to == f[x]) continue;
    f[to] = x;
    dfs(to);
    pre[x] += pre[to];
    int k = w[to] + e[i].w;
    if (k > w[x])
      w[x] = k, p[x] = p[to];
    else if (k == w[x])
      p[x] = x;
  }
}
int Mg(int a, int b) { return (g[a].w == g[b].w) ? rt : p[g[a].sn]; }
int main() {
  int ew, x;
  R(n);
  R(m);
  for (int i = 1; i <= m; ++i) {
    R(x);
    v[x] = pre[x] = 1;
  }
  for (int i = 1; i < n; ++i) {
    R(u1[i]);
    R(u2[i]);
    R(ew);
    s[u1[i]]++;
    s[u2[i]]++;
    e[i << 1].to = u1[i];
    e[i << 1].l = h[u2[i]];
    h[u2[i]] = i << 1;
    e[i << 1 | 1].to = u2[i];
    e[i << 1 | 1].l = h[u1[i]];
    h[u1[i]] = i << 1 | 1;
    e[i << 1].w = e[i << 1 | 1].w = ew;
  }
  for (int i = 1; i <= n; ++i)
    if (s[i] == 1 && !v[i]) v[i]--, q[++qr] = i;
  while (ql <= qr) {
    const int k = q[ql++];
    for (int i = h[k]; i; i = e[i].l) {
      s[e[i].to]--;
      if (s[e[i].to] == 1 && !v[e[i].to]) v[q[++qr] = e[i].to]--;
    }
  }
  for (int i = 1; i <= n; ++i) h[i] = 0;
  for (int i = 1; i < n; ++i) {
    if (v[u1[i]] != -1 && v[u2[i]] != -1) {
      e[i << 1].l = h[u2[i]];
      h[u2[i]] = i << 1;
      e[i << 1 | 1].l = h[u1[i]];
      h[u1[i]] = i << 1 | 1;
    }
  }
  for (int i = 1; i <= n; ++i)
    if (~v[i]) {
      se(i, 0);
      break;
    }
  ma >>= 1;
  while (ll[0][rt].w > ma) rt = ll[0][rt].sn;
  for (int i = h[rt]; i; i = e[i].l) {
    const int to = e[i].to;
    f[to] = rt;
    dfs(to);
    int k = e[i].w + w[to];
    if (k > g[0].w) {
      g[2] = g[1];
      g[1] = g[0];
      g[0] = (P){to, k};
    } else if (k > g[1].w) {
      g[2] = g[1];
      g[1] = (P){to, k};
    } else if (k > g[2].w)
      g[2] = (P){to, k};
  }
  register int p1 = Mg(0, 1), p2 = Mg(0, 2), p3 = Mg(1, 2);
  if (!v[rt]) {
    MA = m;
    ans = 1;
  } else
    D[p1]++;
  for (int i = h[rt]; i; i = e[i].l) {
    const int to = e[i].to;
    if (to == g[0].sn) {
      D[p3] += pre[to];
    } else if (to == g[1].sn) {
      D[p2] += pre[to];
    } else
      D[p1] += pre[to];
  }
  for (int i = df; i; i--) {
    D[f[nu[i]]] += D[nu[i]];
    if (v[nu[i]]) continue;
    pre[nu[i]] += D[nu[i]];
    if (pre[nu[i]] > MA) {
      MA = pre[nu[i]];
      ans = 1;
    } else if (pre[nu[i]] == MA)
      ans++;
  }
  if (!MA)
    printf("0 %d", n - m);
  else
    printf("%d %d", MA, ans);
  return 0;
}
