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;
namespace FGF {
const int N = 1e5 + 5;
int n, m, is[N], f[N][3], g[N][3], h[N][2], sum[N], ans, mx, cnt, head[N],
    lca[N], fa[N];
struct edg {
  int to, nxt, w;
} e[N << 1];
void add(int u, int v, int w) {
  cnt++;
  e[cnt].to = v;
  e[cnt].nxt = head[u];
  head[u] = cnt;
  e[cnt].w = w;
}
void dfs(int u, int ff) {
  if (is[u]) f[u][0] = 0, g[u][0] = u;
  fa[u] = ff;
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v != ff) {
      dfs(v, u);
      int w = e[i].w + f[v][0];
      if (w > f[u][0])
        f[u][2] = f[u][1], f[u][1] = f[u][0], f[u][0] = w, g[u][2] = g[u][1],
        g[u][1] = g[u][0], g[u][0] = lca[v], h[u][1] = h[u][0], h[u][0] = v;
      else if (w > f[u][1])
        f[u][2] = f[u][1], f[u][1] = w, g[u][2] = g[u][1], g[u][1] = lca[v],
        h[u][1] = v;
      else if (w > f[u][2])
        f[u][2] = w, g[u][2] = lca[v];
    }
  }
  lca[u] = (f[u][0] == f[u][1] ? u : g[u][0]);
}
void dp(int u, int x, int LCA, int len) {
  if (is[u]) {
    if (f[u][0] > len) sum[lca[u]]++, sum[fa[u]]--;
    if (f[u][0] < len) sum[u]++, sum[x]++, sum[LCA]--, sum[fa[LCA]]--;
  }
  for (int i = head[u], k, l; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v != fa[u]) {
      if (v == h[u][0])
        k = f[u][1], l = (f[u][1] == f[u][2] ? u : g[u][1]);
      else if (v == h[u][1])
        k = f[u][0], l = (f[u][0] == f[u][2] ? u : g[u][0]);
      else
        k = f[u][0], l = lca[u];
      if (k > len)
        dp(v, l, u, e[i].w + k);
      else if (k == len)
        dp(v, u, u, e[i].w + k);
      else
        dp(v, x, LCA, len + e[i].w);
    }
  }
}
void dfs2(int u, int fa) {
  for (int i = head[u]; i; i = e[i].nxt)
    if (e[i].to != fa) dfs2(e[i].to, u), sum[u] += sum[e[i].to];
}
void work() {
  scanf("%d%d", &n, &m);
  for (int i = 1, x; i <= m; i++) scanf("%d", &x), is[x] = 1;
  for (int i = 1, u, v, w; i < n; i++)
    scanf("%d%d%d", &u, &v, &w), add(u, v, w), add(v, u, w);
  memset(f, -0x3f, sizeof(f));
  dfs(1, 0), dp(1, 0, 0, -1e9), dfs2(1, 0);
  for (int i = 1; i <= n; i++)
    if (!is[i]) {
      if (sum[i] > mx)
        mx = sum[i], ans = 1;
      else if (sum[i] == mx)
        ans++;
    }
  printf("%d %d\n", mx, ans);
}
}  // namespace FGF
int main() {
  FGF::work();
  return 0;
}
