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;
inline int rd() {
  int x = 0;
  bool f = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') f = 1, c = getchar();
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  return f ? -x : x;
}
const int SIZE = 100005;
bool mark[SIZE];
int n, m;
int head[SIZE], ecnt;
struct Edge {
  int v, l, nxt;
} edge[SIZE << 1];
void Add_Edge(int u, int v, int d) {
  ++ecnt;
  edge[ecnt].v = v;
  edge[ecnt].l = d;
  edge[ecnt].nxt = head[u];
  head[u] = ecnt;
}
int dep[SIZE];
int sz[SIZE];
int fa[SIZE], son[SIZE], tp[SIZE];
struct FRIEND {
  int from;
  int d;
} mx[3][SIZE], F[SIZE], tmp;
void dfs(int u) {
  sz[u] = 1;
  dep[u] = dep[fa[u]] + 1;
  for (register int i = head[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == fa[u]) continue;
    fa[e.v] = u;
    dfs(e.v);
    if (mx[0][e.v].from) {
      int from = mx[0][e.v].from;
      if (mx[0][e.v].d == mx[1][e.v].d) from = e.v;
      if (mx[0][e.v].d + e.l > mx[0][u].d) {
        mx[2][u] = mx[1][u];
        mx[1][u] = mx[0][u];
        mx[0][u].d = mx[0][e.v].d + e.l;
        mx[0][u].from = from;
      } else if (mx[0][e.v].d + e.l > mx[1][u].d) {
        mx[2][u] = mx[1][u];
        mx[1][u].d = mx[0][e.v].d + e.l;
        mx[1][u].from = from;
      } else if (mx[0][e.v].d + e.l > mx[2][u].d) {
        mx[2][u].d = mx[0][e.v].d + e.l;
        mx[2][u].from = from;
      }
    } else if (mark[e.v]) {
      if (e.l > mx[0][u].d) {
        mx[2][u] = mx[1][u];
        mx[1][u] = mx[0][u];
        mx[0][u].d = e.l;
        mx[0][u].from = e.v;
      } else if (e.l > mx[1][u].d) {
        mx[2][u] = mx[1][u];
        mx[1][u].d = e.l;
        mx[1][u].from = e.v;
      } else if (e.l > mx[2][u].d) {
        mx[2][u].d = e.l;
        mx[2][u].from = e.v;
      }
    }
    sz[u] += sz[e.v];
    if (sz[e.v] > sz[son[u]]) son[u] = e.v;
  }
}
void dfs2(int u) {
  if (son[u]) tp[son[u]] = tp[u], dfs2(son[u]);
  for (register int i = head[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == fa[u] || e.v == son[u]) continue;
    tp[e.v] = e.v;
    dfs2(e.v);
  }
}
int sum[SIZE];
void Upd(int u, int v) {
  ++sum[u], ++sum[v];
  while (tp[u] != tp[v]) {
    if (dep[tp[u]] < dep[tp[v]]) swap(u, v);
    u = fa[tp[u]];
  }
  if (dep[u] > dep[v]) swap(u, v);
  --sum[u], --sum[fa[u]];
}
void solve(int u, int Len) {
  if (u == 1) {
    if (mark[u] && mx[0][u].d != mx[1][u].d) Upd(1, mx[0][u].from);
  } else {
    int f = fa[u];
    if (mx[0][u].from == mx[0][f].from || mx[0][f].from == u) {
      tmp = mx[1][f];
      if (tmp.d) tmp.d += Len;
      if (mx[1][f].d == mx[2][f].d) tmp.from = f;
    } else {
      tmp = mx[0][f];
      if (tmp.d) tmp.d += Len;
      if (mx[0][u].from == mx[1][f].from || mx[1][f].from == u) {
        if (mx[0][f].d == mx[2][f].d) tmp.from = f;
      } else {
        if (mx[0][f].d == mx[1][f].d) tmp.from = f;
      }
    }
    F[u] = F[f];
    if (F[u].from == 0) {
      if (mark[f]) {
        F[u].d = Len;
        F[u].from = f;
      }
    }
    if (tmp.d) {
      if (tmp.d > F[u].d)
        F[u] = tmp;
      else if (tmp.d == F[u].d)
        F[u].from = f;
    }
    if (mark[u]) {
      if (F[u].d > mx[0][u].d) {
        Upd(u, F[u].from);
      } else if (mx[0][u].d > F[u].d && mx[0][u].d != mx[1][u].d) {
        Upd(u, mx[0][u].from);
      }
    }
  }
  for (register int i = head[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == fa[u]) continue;
    solve(e.v, e.l);
  }
}
int MX = -1, num;
void DFS(int u) {
  for (register int i = head[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == fa[u]) continue;
    DFS(e.v);
    sum[u] += sum[e.v];
  }
  if (!mark[u]) {
    if (sum[u] > MX)
      MX = sum[u], num = 1;
    else if (sum[u] == MX)
      ++num;
  }
}
void _main() {
  n = rd(), m = rd();
  for (register int i = 1; i <= m; ++i) mark[rd()] = 1;
  for (register int i = 1; i < n; ++i) {
    int u = rd(), v = rd(), l = rd();
    Add_Edge(u, v, l);
    Add_Edge(v, u, l);
  }
  tp[1] = 1;
  dfs(1), dfs2(1);
  solve(1, 0);
  DFS(1);
  printf("%d %d", MX, num);
}
int main() {
  _main();
  return 0;
}
