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 + 3, M = 2e5 + 3;
bool b[N];
int he[N], to[M], len[M], ne[M], f[3][N], g[3][N], h[2][N], p[N], fa[N], s[N];
void pre(int x, int y) {
  if (b[x]) f[0][x] = 0, g[0][x] = x;
  for (int i = he[x], j, k, l; i; i = ne[i])
    if ((j = to[i]) != y) {
      fa[j] = x, pre(j, x), k = f[0][j] + len[i], l = p[j];
      if (k > f[0][x])
        f[2][x] = f[1][x], f[1][x] = f[0][x], f[0][x] = k, g[2][x] = g[1][x],
        g[1][x] = g[0][x], g[0][x] = l, h[1][x] = h[0][x], h[0][x] = j;
      else if (k > f[1][x])
        f[2][x] = f[1][x], f[1][x] = k, g[2][x] = g[1][x], g[1][x] = l,
        h[1][x] = j;
      else if (k > f[2][x])
        f[2][x] = k, g[2][x] = l;
    }
  p[x] = f[0][x] == f[1][x] ? x : g[0][x];
}
void dp(int x, int u, int v, int w) {
  if (b[x])
    if (f[0][x] > w)
      ++s[p[x]], --s[fa[x]];
    else if (f[0][x] < w)
      ++s[u], ++s[x], --s[v], --s[fa[v]];
  for (int i = he[x], j, k, l; i; i = ne[i])
    if ((j = to[i]) != fa[x]) {
      if (j == h[0][x])
        k = f[1][x], l = f[1][x] == f[2][x] ? x : g[1][x];
      else if (j == h[1][x])
        k = f[0][x], l = f[0][x] == f[2][x] ? x : g[0][x];
      else
        k = f[0][x], l = p[x];
      if (k > w)
        dp(j, l, x, k + len[i]);
      else if (k == w)
        dp(j, x, x, k + len[i]);
      else
        dp(j, u, v, w + len[i]);
    }
}
void dfs(int x) {
  for (int i = he[x], j; i; i = ne[i])
    if ((j = to[i]) != fa[x]) dfs(j), s[x] += s[j];
}
int main() {
  int n, m, i, j, k, l, t = 0;
  scanf("%d%d", &n, &m), memset(f, -9, sizeof(f));
  for (i = 1; i <= m; ++i) scanf("%d", &j), b[j] = 1;
  for (i = 1; i < n; ++i) {
    scanf("%d%d%d", &j, &k, &l);
    ne[++t] = he[j], to[t] = k, len[t] = l, he[j] = t;
    ne[++t] = he[k], to[t] = j, len[t] = l, he[k] = t;
  }
  pre(1, 0), dp(1, 0, 0, -1e9), dfs(1);
  for (i = 1, j = k = 0; i <= n; ++i)
    if (!b[i])
      if (s[i] > j)
        j = s[i], k = 1;
      else if (s[i] == j)
        ++k;
  printf("%d %d\n", j, k);
  return 0;
}
