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 inf = 1000000007;
const int N = 100100;
struct ed {
  int ne, to, w;
} e[2 * N];
struct nd {
  int d, id;
} res[3];
struct an {
  int mx, cnt;
} ans;
int he[N], tot = 0, sum[N], cf[N], fa[N][20], dist[N], dep[N], a[N], is[N],
           vis[N], p[N], q[N], bel[N], cnt = 0, n, m, d1, d2, lc;
void add(int x, int y, int w) {
  e[++tot].ne = he[x];
  he[x] = tot;
  e[tot].to = y;
  e[tot].w = w;
}
void dfs(int x, int f) {
  int i, y;
  fa[x][0] = f;
  for (i = he[x]; i; i = e[i].ne)
    if ((y = e[i].to) != f) {
      dep[y] = dep[x] + 1;
      dist[y] = dist[x] + e[i].w;
      dfs(y, x);
    }
}
void ycl() {
  for (int i = 1; i <= 17; i++)
    for (int j = 1; j <= n; j++) fa[j][i] = fa[fa[j][i - 1]][i - 1];
}
int lca(int x, int y) {
  int i;
  if (dep[x] < dep[y]) swap(x, y);
  for (i = 17; i >= 0; i--)
    if (dep[x] - dep[y] >= (1 << i)) x = fa[x][i];
  if (x == y) return x;
  for (i = 17; i >= 0; i--)
    if (fa[x][i] != fa[y][i]) x = fa[x][i], y = fa[y][i];
  return fa[x][0];
}
int dis(int x, int y) {
  int l = lca(x, y);
  return dist[x] + dist[y] - 2 * dist[l];
}
void upd(int x) {
  if (x == ans.mx)
    ans.cnt++;
  else if (x > ans.mx)
    ans.mx = x, ans.cnt = 1;
}
void put(int x, int y) {
  while (x != y) {
    cnt++;
    p[x] = cnt;
    q[cnt] = x;
    vis[x] = 1;
    x = fa[x][0];
  }
  vis[y] = 1;
}
void dfs2(int x, int f, int rt) {
  int i, y;
  bel[x] = rt;
  for (i = he[x]; i; i = e[i].ne)
    if (((y = e[i].to) != f) && (!vis[y])) dfs2(y, x, rt);
}
void dfs3(int x, int f, int rt) {
  int i, y;
  sum[x] = is[x];
  for (i = he[x]; i; i = e[i].ne)
    if (((y = e[i].to) != f) && (!vis[y])) {
      dfs3(y, x, rt);
      sum[x] += sum[y];
    }
  if ((x != rt) && (!is[x])) upd(sum[x]);
}
int main() {
  int i, j, k, d, x, y, z;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= m; i++) scanf("%d", &a[i]), is[a[i]] = 1;
  for (i = 1; i < n; i++) {
    scanf("%d%d%d", &x, &y, &z);
    add(x, y, z);
    add(y, x, z);
  }
  dfs(1, 0);
  ycl();
  d1 = a[1];
  d2 = a[2];
  d = dis(a[1], a[2]);
  for (i = 3; i <= m; i++) {
    x = dis(d1, a[i]);
    y = dis(d2, a[i]);
    if ((d <= x) && (y <= x))
      d2 = a[i], d = x;
    else if ((d <= y) && (x <= y))
      d1 = a[i], d = y;
  }
  lc = lca(d1, d2);
  cnt = 0;
  put(d1, lc);
  cnt++;
  p[lc] = cnt;
  q[cnt] = lc;
  put(d2, lc);
  y = cnt;
  x = d2;
  while (x != lc) {
    p[x] = y;
    q[y] = x;
    y--;
    x = fa[x][0];
  }
  for (i = 1; i <= cnt; i++) dfs2(q[i], 0, q[i]);
  res[0].d = -1;
  res[1].d = -1;
  for (i = 1; i <= m; i++)
    if (((x = dis(d1, bel[a[i]])) * 2 < d) && (x == dis(bel[a[i]], a[i]))) {
      if (x > res[0].d) res[0].d = x, res[0].id = bel[a[i]];
    } else if (((x = dis(d2, bel[a[i]])) * 2 < d) &&
               (x == dis(bel[a[i]], a[i]))) {
      if (x > res[1].d) res[1].d = x, res[1].id = bel[a[i]];
    }
  for (i = 1; i <= m; i++) {
    x = dis(d1, bel[a[i]]);
    y = dis(d2, bel[a[i]]);
    if (x == y)
      cf[p[bel[a[i]]]]++, cf[p[bel[a[i]]] + 1]--;
    else if (x < y)
      cf[p[bel[a[i]]]]++, cf[p[res[1].id] + 1]--;
    else
      cf[p[res[0].id]]++, cf[p[bel[a[i]]] + 1]--;
  }
  for (i = 1; i <= cnt; i++) sum[i] = sum[i - 1] + cf[i];
  ans.mx = ans.cnt = 0;
  for (i = 1; i <= cnt; i++)
    if (!is[q[i]]) upd(sum[i]);
  for (i = 1; i <= cnt; i++) dfs3(q[i], 0, q[i]);
  printf("%d %d\n", ans.mx, ans.cnt);
  return 0;
}
