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 MAX_N = 111111;
int g[MAX_N << 1], nxt[MAX_N << 1], c[MAX_N], nm, cost[MAX_N << 1];
int fa[MAX_N][22], d[MAX_N], lg[MAX_N];
int down[MAX_N], down2[MAX_N], up[MAX_N];
int down_bg[MAX_N], down_cnt[MAX_N], down2_bg[MAX_N], down2_cnt[MAX_N],
    up_bg[MAX_N], up_cnt[MAX_N];
int n, m;
int ans[MAX_N];
int col[MAX_N];
void addedge(int x, int y, int w) {
  g[nm] = y;
  nxt[nm] = c[x];
  c[x] = nm;
  cost[nm] = w;
  nm++;
}
void dfs_down(int i, int p, int dep) {
  fa[i][0] = p;
  d[i] = dep;
  down[i] = col[i] ? 0 : -100000000000000LL;
  if (col[i]) down_bg[i] = i;
  for (int k = 1; k <= lg[d[i]]; ++k) fa[i][k] = fa[fa[i][k - 1]][k - 1];
  for (int k = c[i]; ~k; k = nxt[k]) {
    int j = g[k];
    if (j == p) continue;
    dfs_down(j, i, dep + 1);
    if (down[j] == -100000000000000LL) continue;
    int tmp = down[j] + cost[k];
    if (tmp > down[i]) {
      if (1) {
        if (down2[i] < down[i]) down2_cnt[i] = 0;
        down2_cnt[i] += down_cnt[i];
        down2[i] = down[i];
        down2_bg[i] = down_bg[i];
      }
      down[i] = tmp;
      down_cnt[i] = 1;
      down_bg[i] = down_bg[j];
    } else {
      if (tmp == down[i]) down_cnt[i]++;
      if (tmp > down2[i]) {
        down2[i] = tmp;
        down2_cnt[i] = 1;
        down2_bg[i] = down_bg[j];
      } else if (tmp == down2[i])
        down2_cnt[i]++;
    }
  }
  if (down_cnt[i] > 1) down_bg[i] = i;
  if (down2_cnt[i] > 1) down2_bg[i] = i;
}
void dfs_up(int i) {
  for (int k = c[i]; ~k; k = nxt[k]) {
    int j = g[k];
    if (j == fa[i][0]) continue;
    if (up[i] != -100000000000000LL) {
      up[j] = up[i] + cost[k];
      up_bg[j] = up_bg[i];
      up_cnt[j] = 1;
    }
    if (down[i] == down[j] + cost[k]) {
      if (down[i] == down2[i]) {
        int tmp = down2[i] + cost[k];
        if (tmp > up[j]) {
          up[j] = tmp;
          if (down2_cnt[i] > 1) {
            up_bg[j] = 0;
            up_cnt[j] = 2;
          } else {
            up_cnt[j] = 1;
            if (down2_bg[i] != down_bg[j])
              up_bg[j] = down2_bg[i];
            else {
              for (int p = c[i]; ~p; p = nxt[p]) {
                int u = g[p];
                if (fa[u][0] == i && down2_bg[i] != down_bg[u] &&
                    down2[i] == down[u] + cost[p]) {
                  up_bg[j] = down_bg[u];
                  break;
                }
              }
            }
          }
        } else if (tmp == up[j])
          up_cnt[j]++;
      } else {
        int tmp = down2[i] + cost[k];
        if (tmp > up[j]) {
          up[j] = tmp;
          up_bg[j] = down2_bg[i];
          up_cnt[j] = down2_cnt[i];
        } else if (tmp == up[j])
          up_cnt[j] += down2_cnt[i];
      }
    } else {
      int tmp = down[i] + cost[k];
      if (tmp > up[j]) {
        up[j] = tmp;
        up_bg[j] = down_bg[i];
        up_cnt[j] = down_cnt[i];
      } else if (tmp == up[j])
        up_cnt[j] += down_cnt[i];
    }
    if (up_cnt[j] > 1) up_bg[j] = i;
    dfs_up(j);
  }
}
void dfs_ans(int i) {
  for (int k = c[i]; ~k; k = nxt[k]) {
    int j = g[k];
    if (fa[j][0] == i) dfs_ans(j), ans[i] += ans[j];
  }
}
int get(int i, int k) {
  for (; k; k -= (1 << lg[k])) i = fa[i][lg[k]];
  return i;
}
int lca(int a, int b) {
  if (d[a] > d[b]) swap(a, b);
  b = get(b, d[b] - d[a]);
  if (a == b) return a;
  for (int k = lg[d[a]]; k >= 0; --k)
    if (fa[a][k] != fa[b][k]) a = fa[a][k], b = fa[b][k];
  return fa[a][0];
}
int main() {
  scanf("%d%d", &n, &m);
  memset(c, -1, sizeof c);
  for (int i = 2; i <= n; ++i) lg[i] = lg[i - 1] + ((1 << lg[i - 1] + 1) == i);
  for (int i = 1; i <= n; ++i) up[i] = -100000000000000LL;
  for (int i = 1; i <= m; ++i) {
    int v;
    scanf("%d", &v);
    col[v] = 1;
    up[v] = 0;
    up_bg[v] = v;
  }
  for (int i = 1; i < n; ++i) {
    int x, y, w;
    scanf("%d%d%d", &x, &y, &w);
    addedge(x, y, w);
    addedge(y, x, w);
  }
  dfs_down(1, -1, 0);
  dfs_up(1);
  for (int i = 1; i <= n; ++i) {
    if (up[i] == down[i] || col[i] == 0) continue;
    int x = up[i] > down[i] ? up_bg[i] : down_bg[i];
    if (x == i) {
      ans[x]++;
      ans[fa[x][0]]--;
    } else {
      int t = lca(x, i);
      ans[x]++;
      ans[i]++;
      ans[t]--;
      ans[fa[t][0]]--;
    }
  }
  dfs_ans(1);
  int amx = -1, acnt = -1;
  for (int i = 1; i <= n; ++i)
    if (col[i] == 0) {
      if (ans[i] > amx)
        amx = ans[i], acnt = 1;
      else if (ans[i] == amx)
        acnt++;
    }
  printf("%d %d\n", amx, acnt);
}
