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>
int to[2 * 100100], dis[2 * 100100], next[2 * 100100], head[100100];
int w[100100], pa[100100], s[100100];
int f[100100][3], g[100100][3];
bool c[100100];
void dfs1(int u) {
  int v, i, x = (c[u]) ? 0 : (-1e9), y = 0;
  for (i = head[u]; i; i = next[i]) {
    v = to[i];
    if (pa[u] == v) continue;
    pa[v] = u, w[v] = dis[i];
    dfs1(v);
    if (x < f[v][0] + w[v])
      x = f[v][0] + w[v], y = f[v][1];
    else if (x == f[v][0] + w[v])
      y = 0;
  }
  f[u][0] = x, f[u][1] = !y ? u : y, f[u][2] = u;
}
void dfs2(int u) {
  int v, i, x = -1e9, y = 0, z = pa[u];
  for (i = head[z]; i; i = next[i]) {
    v = to[i];
    if (v == u || pa[z] == v) continue;
    if (x < f[v][0] + w[v] + w[u])
      x = f[v][0] + w[v] + w[u], y = f[v][1];
    else if (x == f[v][0] + w[v] + w[u])
      y = 0;
  }
  if (x < g[z][0] + w[u])
    g[u][0] = g[z][0] + w[u], g[u][1] = g[z][1], g[u][2] = g[z][2];
  else if (x > g[z][0] + w[u])
    g[u][0] = x, g[u][1] = !y ? z : y, g[u][2] = z;
  else
    g[u][0] = x, g[u][1] = g[u][2] = z;
  if (g[u][0] < 0 && c[u]) g[u][0] = 0, g[u][1] = g[u][2] = u;
  for (i = head[u]; i; i = next[i]) {
    v = to[i];
    if (pa[u] == v) continue;
    dfs2(v);
  }
}
void dfs(int u) {
  int i, v;
  for (i = head[u]; i; i = next[i]) {
    v = to[i];
    if (pa[u] == v) continue;
    dfs(v);
    s[u] += s[v];
  }
}
int main() {
  int n, m, i, j, k, cnt = 0, x, y;
  scanf("%d %d", &n, &m);
  while (m--) scanf("%d", &i), c[i] = 1;
  for (m = 1; m < n; m++) {
    scanf("%d %d %d", &i, &j, &k);
    cnt++;
    to[cnt] = j, dis[cnt] = k;
    next[cnt] = head[i], head[i] = cnt;
    cnt++;
    to[cnt] = i, dis[cnt] = k;
    next[cnt] = head[j], head[j] = cnt;
  }
  memset(f, 192, sizeof(f));
  memset(g, 192, sizeof(g));
  dfs1(1), dfs2(1);
  for (i = 1; i <= n; i++)
    if (c[i] && f[i][0] != g[i][0]) {
      if (f[i][0] > g[i][0])
        x = f[i][1], y = f[i][2];
      else if (f[i][0] < g[i][0])
        x = g[i][1], y = g[i][2];
      s[i]++, s[x]++, s[y]--, s[pa[y]]--;
    }
  dfs(1);
  x = -1e9;
  for (i = 1; i <= n; i++)
    if (!c[i]) {
      if (s[i] > x)
        x = s[i], y = 1;
      else if (s[i] == x)
        y++;
    }
  printf("%d %d\n", x, y);
}
