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;
template <typename A, typename B>
inline void chkmax(A &x, const B y) {
  if (x < y) x = y;
}
template <typename A, typename B>
inline void chkmin(A &x, const B y) {
  if (x > y) x = y;
}
const int N = 1e5 + 5;
int n, m;
struct Graph {
  int tot, to[N << 1], nxt[N << 1], len[N << 1], head[N];
  void add(int x, int y, int z) {
    tot++;
    to[tot] = y;
    nxt[tot] = head[x];
    len[tot] = z;
    head[x] = tot;
  }
  void clear() {
    memset(head, -1, sizeof head);
    tot = 0;
  }
} G;
bool mark[N];
long long dis[N], dis1[N], dis2[N], dis3[N];
int lca[N], pos[N], lca2[N];
int fa[N][20], dep[N];
void dfs(int x, int f) {
  dep[x] = dep[f] + 1;
  fa[x][0] = f;
  if (mark[x]) dis2[x] = 0, lca[x] = x, lca2[x] = x;
  for (int i = G.head[x]; i != -1; i = G.nxt[i]) {
    int v = G.to[i];
    if (v == f) continue;
    dis[v] = dis[x] + G.len[i];
    dfs(v, x);
    if (dis2[v] == -1) continue;
    if (dis2[v] + G.len[i] > dis2[x]) {
      dis3[x] = dis2[x];
      lca2[x] = lca[x];
      dis2[x] = dis2[v] + G.len[i];
      lca[x] = lca[v];
      pos[x] = v;
    } else if (dis2[v] + G.len[i] == dis2[x]) {
      dis3[x] = dis2[x];
      lca[x] = lca2[x] = x;
    } else if (dis2[v] + G.len[i] > dis3[x]) {
      dis3[x] = dis2[v] + G.len[i];
      lca2[x] = lca2[v];
    }
  }
}
void top_dfs(int x, int f, long long mxd, int Lca) {
  if (dis[x] + mxd > dis2[x]) {
    dis1[x] = dis[x] + mxd;
    lca[x] = Lca;
  } else if (dis[x] + mxd < dis2[x])
    dis1[x] = dis2[x];
  else
    lca[x] = x;
  for (int i = G.head[x]; i != -1; i = G.nxt[i]) {
    int v = G.to[i];
    if (v == f) continue;
    int vd = mxd, vl = Lca;
    if (v == pos[x]) {
      if (vd < dis3[x] - dis[x]) vd = dis3[x] - dis[x], vl = lca2[x];
    } else {
      if (vd < dis2[x] - dis[x]) vd = dis2[x] - dis[x], vl = lca[x];
    }
    top_dfs(v, x, vd, vl);
  }
}
void init() {
  for (int j = (1), jR = (19); j <= jR; j++)
    for (int i = (1), iR = (n); i <= iR; i++)
      fa[i][j] = fa[fa[i][j - 1]][j - 1];
}
void jump(int &x, int stp) {
  for (int i = 0, iR = (20); i < iR; i++)
    if (stp >> i & 1) x = fa[x][i];
}
int LCA(int a, int b) {
  if (dep[a] > dep[b]) swap(a, b);
  jump(b, dep[b] - dep[a]);
  if (a == b) return a;
  for (int i = (19), iL = (0); i >= iL; i--)
    if (fa[a][i] != fa[b][i]) a = fa[a][i], b = fa[b][i];
  return fa[a][0];
}
int cnt[N];
int ans1, ans2;
void dfs_ans(int x, int f) {
  for (int i = G.head[x]; i != -1; i = G.nxt[i]) {
    int v = G.to[i];
    if (v == f) continue;
    dfs_ans(v, x);
    cnt[x] += cnt[v];
  }
  if (!mark[x]) {
    if (ans1 < cnt[x])
      ans1 = cnt[x], ans2 = 1;
    else if (ans1 == cnt[x])
      ans2++;
  }
}
int main() {
  G.clear();
  scanf("%d%d", &n, &m);
  for (int i = (1), iR = (m); i <= iR; i++) {
    int x;
    scanf("%d", &x);
    mark[x] = 1;
  }
  for (int i = (1), iR = (n - 1); i <= iR; i++) {
    int x, y, z;
    scanf("%d%d%d", &x, &y, &z);
    G.add(x, y, z), G.add(y, x, z);
  }
  memset(dis2, -1, sizeof dis2);
  dfs(1, 0);
  top_dfs(1, 0, 0, 0);
  init();
  for (int i = (1), iR = (n); i <= iR; i++) {
    if (lca[i] == i || !mark[i]) continue;
    int L = LCA(i, lca[i]);
    cnt[i]++, cnt[lca[i]]++;
    cnt[L]--;
    cnt[fa[L][0]]--;
  }
  dfs_ans(1, 0);
  printf("%d %d\n", ans1, ans2);
  return 0;
}
