#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;
}
