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;
char IO;
inline int rd() {
  int res = 0;
  while ((IO = getchar()) && (IO < '0' || IO > '9'))
    ;
  while (IO >= '0' && IO <= '9')
    res = (res << 1) + (res << 3) + (IO ^ 48), IO = getchar();
  return res;
}
const int SIZE = 100005;
int n, m;
int first[SIZE], ecnt;
struct Edge {
  int v, dis, nxt;
} edge[SIZE << 1];
void Add_Edge(int u, int v, int dis) {
  ++ecnt;
  edge[ecnt].v = v;
  edge[ecnt].dis = dis;
  edge[ecnt].nxt = first[u];
  first[u] = ecnt;
}
int dep[SIZE];
bool vip[SIZE];
int f[SIZE];
int Mx[SIZE][2];
int u1[SIZE], u2[SIZE];
int len = -1;
int x, y;
void dfs(int u) {
  for (register int i = first[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == f[u]) continue;
    dep[e.v] = dep[u] + e.dis;
    f[e.v] = u;
    dfs(e.v);
    if (vip[e.v] || Mx[e.v][0]) {
      int tem = Mx[e.v][0] + e.dis;
      if (tem > Mx[u][0]) {
        Mx[u][1] = Mx[u][0];
        u2[u] = u1[u];
        Mx[u][0] = tem;
        u1[u] = u1[e.v];
      } else if (tem > Mx[u][1]) {
        Mx[u][1] = tem;
        u2[u] = u1[e.v];
      }
    }
  }
  if (Mx[u][0] == 0 && vip[u])
    u1[u] = u;
  else if (Mx[u][0] && (vip[u] || Mx[u][1]) && Mx[u][0] + Mx[u][1] > len) {
    len = Mx[u][0] + Mx[u][1];
    x = u1[u], y = u2[u];
    if (u2[u] == 0) y = u;
  }
}
int cnt[SIZE], sum[SIZE];
void Find(int u, int fa) {
  if (vip[u]) {
    cnt[u] = 1;
    Mx[u][0] = dep[u];
  }
  sum[u] = vip[u];
  for (register int i = first[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == fa || e.v == f[y] || e.v == y) continue;
    dep[e.v] = dep[u] + e.dis;
    Find(e.v, u);
    sum[u] += sum[e.v];
    if (Mx[e.v][0]) {
      if (Mx[e.v][0] == Mx[u][0]) {
        cnt[u] += cnt[e.v];
      } else if (Mx[e.v][0] > Mx[u][0]) {
        Mx[u][0] = Mx[e.v][0];
        cnt[u] = cnt[e.v];
      }
    }
  }
}
int ans = -1, num;
void DFS(int u, int fa) {
  if (!vip[u]) {
    int tem = sum[u];
    if (Mx[u][0] == Mx[x][0] && cnt[u] == cnt[x]) tem = m;
    if (ans < tem) {
      ans = tem;
      num = 1;
    } else if (ans == tem)
      ++num;
  }
  for (register int i = first[u]; i; i = edge[i].nxt) {
    Edge& e = edge[i];
    if (e.v == fa || e.v == f[y] || e.v == y) continue;
    DFS(e.v, u);
  }
}
int main() {
  n = rd(), m = rd();
  for (register int i = 1, _n = m; i <= _n; ++i) vip[rd()] = 1;
  for (register int i = 1, _n = n; i < _n; ++i) {
    int u = rd(), v = rd(), dis = rd();
    Add_Edge(u, v, dis);
    Add_Edge(v, u, dis);
  }
  dfs(1);
  int now = len / 2;
  while (now && now >= dep[x] - dep[f[x]]) x = f[x], now -= dep[x] - dep[f[x]];
  if (now != 0) {
    y = x;
    Add_Edge(0, x, 0);
    Add_Edge(0, f[x], 0);
    x = 0;
  }
  Find(x, 0);
  DFS(x, 0);
  printf("%d %d\n", ans, num);
  return 0;
}
