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;
bool cur1;
int n, m, mx, ans;
int dep[100005], top[100005], son[100005], sze[100005], fa[100005], cnt[100005];
bool hv[100005];
int head[100005], id;
struct edge {
  int to, len, nxt;
} E[100005 << 1];
inline void add_edge(int a, int b, int c) {
  E[++id] = (edge){b, c, head[a]};
  head[a] = id;
}
inline void Rd(int &res) {
  char c;
  res = 0;
  while (c = getchar(), c < 48)
    ;
  do res = (res << 3) + (res << 1) + (c ^ 48);
  while (c = getchar(), c > 47);
  return;
}
void dfs(int x, int f, int d) {
  dep[x] = d;
  sze[x] = 1;
  for (int i = head[x]; i; i = E[i].nxt) {
    int v = E[i].to;
    if (v == f) continue;
    fa[v] = x;
    dfs(v, x, d + 1);
    if (sze[v] > sze[son[x]]) son[x] = v;
    sze[x] += sze[v];
  }
}
void re_dfs(int x, int f, int tp) {
  top[x] = tp;
  if (son[x]) re_dfs(son[x], x, tp);
  for (int i = head[x]; i; i = E[i].nxt) {
    int v = E[i].to;
    if (v == f || v == son[x]) continue;
    re_dfs(v, x, v);
  }
}
inline int LCA(int a, int b) {
  while (top[a] != top[b]) {
    if (dep[top[a]] > dep[top[b]])
      a = fa[top[a]];
    else
      b = fa[top[b]];
  }
  return dep[a] < dep[b] ? a : b;
}
int dis[100005], num[100005];
void dfs_again(int x, int f) {
  dis[x] = -2e9;
  if (hv[x]) dis[x] = 0, num[x] = x;
  for (int i = head[x]; i; i = E[i].nxt) {
    int v = E[i].to;
    if (v == f) continue;
    dfs_again(v, x);
    int o = dis[v] + E[i].len;
    if (o > dis[x])
      dis[x] = o, num[x] = num[v];
    else if (dis[x] == o)
      num[x] = x;
  }
}
int diso[100005], numo[100005];
void always_dfs(int x, int f) {
  int mx1 = diso[x], mx2 = -2e9, mx3 = -2e9;
  int num1 = numo[x], num2 = 0, num3 = 0;
  if (hv[x]) {
    if (0 > mx1)
      mx1 = 0, num1 = x;
    else
      mx2 = 0, num2 = x;
  }
  for (int i = head[x]; i; i = E[i].nxt) {
    int v = E[i].to;
    if (v == f) continue;
    int o = dis[v] + E[i].len;
    if (o > mx1)
      num3 = num2, mx3 = mx2, mx2 = mx1, num2 = num1, mx1 = o, num1 = num[v];
    else if (o > mx2)
      num3 = num2, mx3 = mx2, mx2 = o, num2 = num[v];
    else if (o > mx3)
      mx3 = o, num3 = num[v];
  }
  for (int i = head[x]; i; i = E[i].nxt) {
    int v = E[i].to;
    if (v == f) continue;
    int o = dis[v] + E[i].len;
    if (o == mx1)
      diso[v] = mx2 + E[i].len;
    else
      diso[v] = mx1 + E[i].len;
    if (o == mx1) {
      if (mx2 == mx3)
        numo[v] = x;
      else
        numo[v] = num2;
    } else if (o == mx2) {
      if (mx1 == mx3)
        numo[v] = x;
      else
        numo[v] = num1;
    } else {
      if (mx1 == mx2)
        numo[v] = x;
      else
        numo[v] = num1;
    }
    if (diso[v] < 0) numo[v] = 0;
    always_dfs(v, x);
  }
}
void last_dfs(int x, int f) {
  for (int i = head[x]; i; i = E[i].nxt) {
    int v = E[i].to;
    if (v == f) continue;
    last_dfs(v, x);
    cnt[x] += cnt[v];
  }
  if (!hv[x]) {
    if (cnt[x] > mx)
      mx = cnt[x], ans = 1;
    else if (cnt[x] == mx)
      ans++;
  }
}
bool cur2;
int main() {
  Rd(n);
  Rd(m);
  for (int i = 1, a; i <= m; i++) Rd(a), hv[a] = 1;
  for (int i = 1, a, b, c; i < n; i++)
    Rd(a), Rd(b), Rd(c), add_edge(a, b, c), add_edge(b, a, c);
  diso[1] = -2e9;
  dfs(1, 0, 1);
  re_dfs(1, 0, 1);
  dfs_again(1, 0);
  always_dfs(1, 0);
  for (int i = 1; i <= n; i++)
    if (dis[i] != diso[i] && hv[i]) {
      if (dis[i] > diso[i])
        cnt[num[i]]++, cnt[fa[i]]--;
      else {
        int a = i, b = numo[i], lca = LCA(a, b);
        cnt[a]++;
        cnt[b]++;
        cnt[lca]--;
        cnt[fa[lca]]--;
      }
    }
  last_dfs(1, 0);
  printf("%d %d\n", mx, ans);
  return 0;
}
