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 = 100007;
int n, m, t, xd, B[N], hd[N], nt[N << 1], to[N << 1], go[N << 1], O[N << 1],
    A[N], E[N], S[N], dL[N], dR[N], dD[N], W[N], P[N], Q[N];
namespace cat {
int p, q, D[N], sz[N], fa[N], le[N];
void fly(int u, int f) {
  sz[u] = B[u];
  for (int i = hd[u]; i; i = nt[i])
    if (to[i] != f) {
      int v = to[i];
      fly(v, u);
      if (!sz[v] || sz[v] == m) {
        int o = (i + 1) / 2;
        O[o * 2 - 1] = O[o * 2] = 1;
      }
      sz[u] += sz[v];
    }
}
void dig(int u) {
  if (D[u] > D[p]) p = u;
  for (int i = hd[u]; i; i = nt[i])
    if (!O[i] && to[i] != fa[u]) {
      int v = to[i];
      fa[v] = u, le[v] = go[i];
      D[v] = D[u] + go[i];
      dig(v);
    }
}
void sol() {
  fly(1, -1);
  for (int i = 1; i <= n; ++i)
    if (B[i]) {
      p = i;
      break;
    }
  D[p] = fa[p] = 0, dig(p), q = p;
  D[p] = fa[p] = 0, dig(p);
  for (;;) {
    A[++t] = p, E[t] = le[p];
    if (p == q) break;
    p = fa[p];
  }
}
}  // namespace cat
void dig(int u, int f, int d) {
  if (d > xd) xd = d;
  for (int i = hd[u]; i; i = nt[i])
    if (!O[i] && to[i] != f) dig(to[i], u, d + go[i]);
}
void fly(int u, int f) {
  S[u] = B[u];
  for (int i = hd[u]; i; i = nt[i])
    if (!O[i] && to[i] != f) {
      fly(to[i], u);
      S[u] += S[to[i]];
    }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    int x;
    scanf("%d", &x);
    B[x] = 1;
  }
  for (int i = 1; i <= n - 1; ++i) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    nt[i * 2 - 1] = hd[x], hd[x] = i * 2 - 1, to[i * 2 - 1] = y,
               go[i * 2 - 1] = z;
    nt[i * 2] = hd[y], hd[y] = i * 2, to[i * 2] = x, go[i * 2] = z;
  }
  cat::sol();
  for (int i = 2; i <= t; ++i) dL[i] = dL[i - 1] + E[i - 1];
  for (int i = t - 1; i >= 1; --i) dR[i] = dR[i + 1] + E[i];
  for (int i = 1; i <= t; ++i) {
    W[i] = B[A[i]];
    for (int e = hd[A[i]]; e; e = nt[e]) {
      int v = to[e];
      xd = 0;
      if (O[e] || v == A[i - 1] || v == A[i + 1]) continue;
      dig(v, A[i], go[e]), fly(v, A[i]);
      W[i] += S[v], dD[i] = max(dD[i], xd);
    }
  }
  for (int i = 1; i <= t; ++i) {
    P[i] = P[i - 1];
    if (dL[i] < dR[i])
      P[i] += W[i];
    else if (dD[i] == dR[i])
      break;
  }
  for (int i = t; i >= 1; --i) {
    Q[i] = Q[i + 1];
    if (dL[i] > dR[i])
      Q[i] += W[i];
    else if (dD[i] == dL[i])
      break;
  }
  for (int i = 1; i <= n; ++i) S[A[i]] = P[i] + Q[i];
  for (int i = 1; i <= t; ++i)
    if (dL[i] == dR[i]) {
      S[A[i]] = m;
      break;
    }
  int s1 = 0, s2 = 0;
  for (int i = 1; i <= n; ++i) {
    if (B[i]) continue;
    if (S[i] > s1)
      s1 = S[i], s2 = 1;
    else if (S[i] == s1)
      ++s2;
  }
  printf("%d %d", s1, s2);
  return 0;
}
