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;
int h[100002], len, lik[2][100002], dep[100002], f[100002][20], ID[2][100002],
    Ans[100002], ans;
bool mark[100002];
struct ll {
  int l, to, c;
} edge[100002 << 1];
void Add(int st, int to, int c) {
  edge[++len].to = to;
  edge[len].c = c;
  edge[len].l = h[st];
  h[st] = len;
}
void dfs(int x, int fa) {
  dep[x] = dep[fa] + 1;
  f[x][0] = fa;
  ID[0][x] = ID[1][x] = x;
  lik[0][x] = lik[1][x] = mark[x] ? 0 : -1;
  for (int i = h[x]; i; i = edge[i].l) {
    int y = edge[i].to;
    if (y == fa) continue;
    dfs(y, x);
    if (lik[0][y] == -1) continue;
    int num = lik[0][y] + edge[i].c;
    if (lik[0][x] < num) {
      ID[1][x] = ID[0][x];
      ID[0][x] = ID[0][y];
      lik[1][x] = lik[0][x];
      lik[0][x] = num;
    } else if (lik[1][x] < num)
      lik[1][x] = num, ID[1][x] = ID[0][y];
  }
}
void Up(int &b, int step) {
  for (int i = 0; i < 17; i++)
    if (step & (1 << i)) b = f[b][i];
}
int LCA(int a, int b) {
  if (dep[a] > dep[b]) swap(a, b);
  Up(b, dep[b] - dep[a]);
  if (a == b) return a;
  for (int i = 16; i >= 0; i--)
    if (f[a][i] != f[b][i]) a = f[a][i], b = f[b][i];
  return f[a][0];
}
void dfs2(int x, int fa, int dis, int id) {
  if (dis > lik[0][x]) {
    lik[1][x] = lik[0][x], lik[0][x] = dis;
    ID[1][x] = ID[0][x];
    ID[0][x] = id;
  } else if (dis > lik[1][x])
    lik[1][x] = dis, ID[1][x] = id;
  if (lik[0][x] == lik[1][x])
    ID[0][x] = ID[1][x] = x;
  else if (mark[x]) {
    int lca = LCA(ID[0][x], x);
    Ans[x]++, Ans[ID[0][x]]++, Ans[lca]--, Ans[f[lca][0]]--;
  }
  for (int i = h[x]; i; i = edge[i].l) {
    int y = edge[i].to;
    if (y == fa) continue;
    if (lik[0][x] == lik[0][y] + edge[i].c && lik[1][x] != -1)
      dfs2(y, x, lik[1][x] + edge[i].c, ID[1][x]);
    else if (lik[0][x] != -1)
      dfs2(y, x, lik[0][x] + edge[i].c, ID[0][x]);
    else
      dfs2(y, x, -1e9, 0);
  }
}
void dfs3(int x, int fa) {
  for (int i = h[x]; i; i = edge[i].l) {
    int y = edge[i].to;
    if (y == fa) continue;
    dfs3(y, x);
    Ans[x] += Ans[y];
  }
  if (!mark[x]) ans = max(ans, Ans[x]);
}
int main() {
  int n, m, u, v, c, a;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) scanf("%d", &a), mark[a] = 1;
  for (int i = 1; i < n; i++)
    scanf("%d%d%d", &u, &v, &c), Add(u, v, c), Add(v, u, c);
  dfs(1, 0);
  for (int i = 1; i < 17; i++) {
    if ((1 << i) > n) break;
    for (int j = 1; j <= n; j++) f[j][i] = f[f[j][i - 1]][i - 1];
  }
  dfs2(1, 0, -1e9, 0);
  dfs3(1, 0);
  printf("%d ", ans);
  int num = 0;
  for (int i = 1; i <= n; i++)
    if (!mark[i] && Ans[i] == ans) num++;
  printf("%d\n", num);
  return 0;
}
