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>
const int N = 100000 + 9;
int n, m, son[N], lnk[N * 2], w[N * 2], nxt[N * 2], dis[N], fir[N], dfn[N],
    fa[N], tot, ec, f[N];
bool v[N], vis[N];
inline void addedge(int x, int y, int z) {
  nxt[++ec] = son[x];
  son[x] = ec;
  lnk[ec] = y;
  w[ec] = z;
}
void dfs(int u, int father) {
  dfn[++tot] = u;
  fa[u] = father;
  if (father && !fa[father])
    fir[u] = u;
  else
    fir[u] = fir[father];
  for (int i = son[u]; i; i = nxt[i])
    if (lnk[i] != father) {
      dis[lnk[i]] = dis[u] + w[i];
      dfs(lnk[i], u);
    }
}
int walk(int s) {
  tot = 0;
  dis[s] = 0;
  dfs(s, 0);
  for (int i = 1; i <= n; ++i)
    if (dis[s] < dis[i] && v[i]) s = i;
  return s;
}
int main() {
  scanf("%d%d", &n, &m);
  int tmp;
  for (int x, i = 1; i <= m; ++i) scanf("%d", &x), v[x] = true, tmp = x;
  for (int i = 1, x, y, z; i < n; ++i) {
    scanf("%d%d%d", &x, &y, &z);
    addedge(x, y, z);
    addedge(y, x, z);
  }
  int s = walk(tmp), t = walk(s), mid, cnt = 0;
  for (mid = fa[t]; dis[mid] > dis[t] / 2; mid = fa[mid])
    ;
  tot = 0;
  dis[mid] = 0;
  dfs(mid, 0);
  for (int i = 1; i <= n; ++i) {
    if (!v[i] || vis[fir[i]]) continue;
    if (dis[i] == dis[t]) ++cnt, vis[fir[i]] = true;
  }
  for (int i = 1; i <= n; ++i)
    if (v[i]) {
      ++f[i];
      if (fir[i] == fir[s] && cnt < 3)
        ++f[t];
      else if (fir[i] == fir[t] && cnt < 3)
        ++f[s];
      else if (fir[i] != fir[s] && fir[i] != fir[t] && cnt < 2)
        ++f[t];
    }
  int ans = 0, ans1 = 0;
  if (!v[mid]) ans = m, ans1 = 1;
  for (int i = n; i > 1; --i) {
    f[fa[dfn[i]]] += f[dfn[i]];
    if (!v[dfn[i]] && ans < f[dfn[i]])
      ans = f[dfn[i]], ans1 = 1;
    else if (!v[dfn[i]] && ans == f[dfn[i]])
      ++ans1;
  }
  printf("%d %d\n", ans, ans1);
}
