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 N = 1e5 + 10;
struct edge {
  int to, nxt, w;
} e[N << 1];
int head[N], tot = 0;
int n, m;
int vis[N], mxd, id;
int sum[N], dr[N], cnt = 0, pa[N], used[N];
int dp[N], a[N], b[N], siz[N], anc[N], mp[N];
void adde(int u, int v, int w) {
  e[++tot] = edge{v, head[u], w}, head[u] = tot;
}
void dfs(int u, int fa, int dep) {
  pa[u] = fa;
  if (vis[u] && dep > mxd) id = u, mxd = dep;
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v == fa) continue;
    dfs(v, u, dep + e[i].w);
  }
  return;
}
void gtag(int u, int fa, int *a, int dep) {
  a[u] = dep;
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v == fa) continue;
    gtag(v, u, a, dep + e[i].w);
  }
  return;
}
void Dfs(int u, int fa, int rt) {
  siz[u] = vis[u];
  anc[u] = rt;
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v == fa) continue;
    if (used[v]) continue;
    Dfs(v, u, rt);
    siz[u] += siz[v];
    dp[u] = max(dp[u], dp[v] + e[i].w);
  }
  return;
}
int main() {
  scanf("%d%d", &n, &m);
  int x;
  for (int i = 1; i <= m; i++) scanf("%d", &x), vis[x] = 1;
  int u, v, w;
  for (int i = 1; i < n; i++) {
    scanf("%d%d%d", &u, &v, &w);
    adde(u, v, w), adde(v, u, w);
  }
  id = mxd = -1;
  dfs(1, 0, 0);
  int s = id;
  id = mxd = -1;
  dfs(s, 0, 0);
  int t = id;
  swap(s, t);
  for (int now = s; now; now = pa[now])
    dr[++cnt] = now, used[now] = 1, mp[now] = cnt;
  dr[cnt + 1] = n + 1;
  mp[n + 1] = cnt + 1;
  gtag(s, 0, a, 0);
  gtag(t, 0, b, 0);
  for (int i = 1; i <= cnt; i++) Dfs(dr[i], 0, dr[i]);
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (!used[i] && !vis[i]) ans = max(ans, siz[i]);
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) continue;
    int u = anc[i];
    int d = max(a[u], b[u]);
    int k = mp[u];
    if (dp[u] == d || (a[u] == d && b[u] == d))
      sum[k]++, sum[k + 1]--;
    else {
      if (a[u] == d)
        sum[0]++, sum[k + 1]--;
      else
        sum[k]++;
    }
  }
  for (int i = 1; i <= cnt; i++) sum[i] += sum[i - 1];
  for (int i = 1; i <= cnt; i++)
    if (!vis[dr[i]]) ans = max(ans, sum[i]);
  int amou = 0;
  for (int i = 1; i <= n; i++)
    if (!used[i] && !vis[i] && siz[i] == ans) amou++;
  for (int i = 1; i <= cnt; i++)
    if (!vis[dr[i]] && sum[i] == ans) amou++;
  printf("%d %d\n", ans, amou);
  return 0;
}
