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 = 100010;
int n, m, i, x, y, z, vip[N], ans1, ans2;
int g[N], v[N << 1], w[N << 1], nxt[N << 1], ed, dis[N], q[N], t, tag[N],
    cnt[N];
struct P {
  int v, x, y;
  P() { v = -1; }
  P(int _v, int _x, int _y) { v = _v, x = _x, y = _y; }
} d[N], u[N], pre[N], suf[N], fin[N];
inline void read(int& a) {
  char c;
  while (!(((c = getchar()) >= '0') && (c <= '9')))
    ;
  a = c - '0';
  while (((c = getchar()) >= '0') && (c <= '9')) (a *= 10) += c - '0';
}
inline void add(int x, int y, int z) {
  v[++ed] = y;
  w[ed] = z;
  nxt[ed] = g[x];
  g[x] = ed;
}
void dfs1(int x, int f) {
  if (vip[x]) d[x] = P(0, x, x);
  for (int i = g[x]; i; i = nxt[i])
    if (v[i] != f) {
      int y = v[i];
      dis[y] = w[i];
      dfs1(y, x);
      if (d[y].v < 0) continue;
      if (d[y].v + w[i] > d[x].v)
        d[x] = d[y], d[x].v += w[i];
      else if (d[y].v + w[i] == d[x].v)
        d[x].x = x;
    }
  d[x].y = x;
  fin[x] = d[x];
}
void dfs2(int x, int f) {
  t = 0;
  for (int i = g[x]; i; i = nxt[i])
    if (v[i] != f) q[++t] = v[i];
  for (int i = 1; i <= t; i++) {
    int y = q[i];
    pre[i] = pre[i - 1];
    if (d[y].v < 0) continue;
    if (d[y].v + dis[y] > pre[i].v)
      pre[i] = d[y], pre[i].v += dis[y];
    else if (d[y].v + dis[y] > pre[i].v)
      pre[i].x = x;
  }
  suf[t + 1] = P();
  for (int i = t; i; i--) {
    int y = q[i];
    suf[i] = suf[i + 1];
    if (d[y].v < 0) continue;
    if (d[y].v + dis[y] > suf[i].v)
      suf[i] = d[y], suf[i].v += dis[y];
    else if (d[y].v + dis[y] > suf[i].v)
      suf[i].x = x;
  }
  for (int i = 1; i <= t; i++) {
    int y = q[i];
    P B = pre[i - 1];
    if (B.v < suf[i + 1].v)
      B = suf[i + 1];
    else if (B.v == suf[i + 1].v)
      B.x = x;
    B.y = x;
    if (B.v < u[x].v)
      B = u[x];
    else if (B.v == u[x].v)
      B.x = x;
    if (~B.v) B.v += dis[y];
    u[y] = B;
    if (!vip[y]) continue;
    if (B.v > fin[y].v)
      fin[y] = B;
    else if (B.v == fin[y].v)
      fin[y].v = -1;
  }
  for (int i = g[x]; i; i = nxt[i])
    if (v[i] != f) dfs2(v[i], x);
}
inline void modify(int x, int y, int z) {
  tag[z] -= 2;
  tag[x]++;
  tag[y]++;
  cnt[z]++;
}
void dfs3(int x, int f) {
  for (int i = g[x]; i; i = nxt[i])
    if (v[i] != f) dfs3(v[i], x), tag[x] += tag[v[i]];
  cnt[x] += tag[x];
}
int main() {
  read(n), read(m);
  for (i = 1; i <= m; i++) read(x), vip[x] = 1;
  for (i = 1; i < n; i++) read(x), read(y), read(z), add(x, y, z), add(y, x, z);
  dfs1(1, 0);
  if (vip[1]) u[1] = P(0, 1, 1);
  dfs2(1, 0);
  for (i = 1; i <= n; i++)
    if (vip[i])
      if (~fin[i].v) modify(i, fin[i].x, fin[i].y);
  dfs3(1, 0);
  for (i = 1; i <= n; i++)
    if (!vip[i]) {
      if (cnt[i] > ans1)
        ans1 = cnt[i], ans2 = 1;
      else if (cnt[i] == ans1)
        ans2++;
    }
  printf("%d %d", ans1, ans2);
  return 0;
}
