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;
void in(int &r) {
  static char c;
  r = 0;
  while (c = getchar(), c < 48)
    ;
  do r = (r << 1) + (r << 3) + (c ^ 48);
  while (c = getchar(), c > 47);
}
const int mn = 100005;
int head[mn], ne[mn << 1], to[mn << 1], cost[mn << 1], cnt1;
bool mark[mn], in_leg[mn];
int dis[mn], fa[mn], n, m, Mx, cnt;
void dfs(int f, int x) {
  for (int q(head[x]); q; q = ne[q])
    if (to[q] != f) fa[to[q]] = x, dis[to[q]] = dis[x] + cost[q], dfs(x, to[q]);
}
pair<int, int> get_leg() {
  int at1, at2, Mx = 0;
  for (int q = 1, q_end_ = n; q <= q_end_; ++q)
    if (mark[q]) {
      at1 = q;
      break;
    }
  dfs(0, at1);
  for (int q = 1, q_end_ = n; q <= q_end_; ++q)
    if (mark[q] && dis[q] > Mx) Mx = dis[q], at1 = q;
  Mx = 0, dis[at1] = 0, dfs(0, at1);
  for (int q = 1, q_end_ = n; q <= q_end_; ++q)
    if (mark[q] && dis[q] > Mx) Mx = dis[q], at2 = q;
  return make_pair(at1, at2);
}
int que[mn], top, sz[mn], vt[mn], max_lit[mn];
void pre_dfs(int f, int x) {
  mark[x] ? sz[x] = 1 : max_lit[x] = -1e9;
  for (int q(head[x]); q; q = ne[q])
    if (to[q] != f && !in_leg[to[q]])
      pre_dfs(x, to[q]), max_lit[x] = max(max_lit[x], max_lit[to[q]] + 1),
                         sz[x] += sz[to[q]];
  if (!mark[x] && !in_leg[x])
    if (sz[x] > Mx)
      Mx = sz[x], cnt = 1;
    else if (sz[x] == Mx)
      ++cnt;
}
void init(int lf, int rf) {
  while (rf != lf) que[++top] = rf, in_leg[rf] = 1, rf = fa[rf];
  que[++top] = rf, in_leg[rf] = 1;
  for (int q = 1, q_end_ = top >> 1; q <= q_end_; ++q)
    swap(que[q], que[top - q + 1]);
  for (int q = 1, q_end_ = top; q <= q_end_; ++q) pre_dfs(0, que[q]);
}
void solve(pair<int, int> leg) {
  int lf = leg.first, rf = leg.second, lt = top;
  init(lf, rf);
  for (int q = 1, q_end_ = top; q <= q_end_; ++q)
    vt[q] = sz[que[q]] - sz[que[q - 1]];
  for (int q = top, q_end_ = 1; q >= q_end_; --q) {
    if (dis[que[q]] < dis[que[top]] - dis[que[q]])
      vt[q + 1] += sz[que[q]], vt[lt + 1] -= sz[que[q]];
    if (dis[que[top]] - dis[que[q]] == max_lit[que[q]]) lt = q;
  }
  lt = 1;
  for (int q = 1, q_end_ = top; q <= q_end_; ++q) {
    if (dis[que[q]] > dis[que[top]] - dis[que[q]])
      vt[lt] += sz[que[q]], vt[q] -= sz[que[q]];
    if (dis[que[q]] == max_lit[que[q]]) lt = q;
  }
  for (int q = 1, q_end_ = top; q <= q_end_; ++q) {
    vt[q] += vt[q - 1];
    if (!mark[que[q]])
      if (vt[q] > Mx)
        Mx = vt[q], cnt = 1;
      else if (vt[q] == Mx)
        ++cnt;
  }
  printf("%d %d\n", Mx, cnt);
}
int main() {
  int a, b, c;
  in(n), in(m);
  for (int q = 1, q_end_ = m; q <= q_end_; ++q) in(a), mark[a] = 1;
  for (int q = 2, q_end_ = n; q <= q_end_; ++q)
    in(a), in(b), in(c), to[++cnt1] = b, ne[cnt1] = head[a], head[a] = cnt1,
                         cost[cnt1] = c, to[++cnt1] = a, ne[cnt1] = head[b],
                         head[b] = cnt1, cost[cnt1] = c;
  solve(get_leg());
  return 0;
}
