#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int n, m, val[MAXN] = {0}, down[MAXN][3] = {0}, up[MAXN] = {0};
int lazyd[MAXN] = {0}, lazyu[MAXN] = {0}, pcnt[MAXN] = {0};
int numd[MAXN][3], ans[MAXN] = {0}, Max = 0, cnt, CNT = 0;
bool flag[MAXN] = {0};
vector<int> ch[MAXN], c[MAXN];
void dfs1(int x, int fa) {
  int size = ch[x].size(), t, d;
  pcnt[x] = flag[x];
  for (int i = 0; i < size; ++i) {
    t = ch[x][i];
    if (t == fa) continue;
    dfs1(t, x);
    d = down[t][0] + (val[t] = c[x][i]);
    pcnt[x] += pcnt[t];
    if (!down[t][0] && !flag[t]) d = 0;
    if (d > down[x][2]) down[x][2] = d, numd[x][2] = t;
    for (int j = 1; j >= 0; --j)
      if (down[x][j] < down[x][j + 1])
        swap(down[x][j], down[x][j + 1]), swap(numd[x][j], numd[x][j + 1]);
  }
}
void dfs2(int x, int fa) {
  int size = ch[x].size(), t;
  for (int i = 0; i < size; ++i) {
    t = ch[x][i];
    if (t == fa) continue;
    up[t] =
        max(up[t], pcnt[t] == CNT
                       ? 0
                       : max(up[x], numd[x][0] == t ? down[x][1] : down[x][0]) +
                             val[t]);
    dfs2(t, x);
  }
}
void dfs3(int x, int fa) {
  int size = ch[x].size();
  for (int i = 0; i < size; ++i)
    if (ch[x][i] != fa) dfs3(ch[x][i], x);
  ans[x] += (lazyu[x] += flag[x] && up[x] > down[x][0]);
  if (!fa) return;
  int tmp = numd[fa][0] == x ? down[fa][1] : down[fa][0];
  if (tmp == up[fa] ||
      tmp > up[fa] && (numd[fa][0] == x   ? down[fa][1] == down[fa][2]
                       : numd[fa][1] == x ? down[fa][0] == down[fa][2]
                                          : down[fa][0] == down[fa][1])) {
    ans[fa] += lazyu[x];
    return;
  }
  if (tmp < up[fa]) {
    lazyu[fa] += lazyu[x];
    return;
  }
  lazyd[numd[fa][0] == x ? numd[fa][1] : numd[fa][0]] += lazyu[x];
  ans[fa] += lazyu[x];
}
void dfs4(int x, int fa) {
  int size = ch[x].size();
  ans[x] += (lazyd[x] += flag[x] && up[x] < down[x][0]);
  if (down[x][0] != down[x][1]) lazyd[numd[x][0]] += lazyd[x];
  for (int i = 0; i < size; ++i)
    if (ch[x][i] != fa) dfs4(ch[x][i], x);
}
void print() {
  for (int i = 1; i <= n; ++i)
    printf(
        "%d: val=%d flag=%d up=%d down[0]=%d down[1]=%d down[2]=%d numd[0]=%d "
        "numd[1]=%d numd[2]=%d\n",
        i, val[i], flag[i], up[i], down[i][0], down[i][1], down[i][2],
        numd[i][0], numd[i][1], numd[i][2]);
}
void test() {}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  while (m--) {
    int x;
    cin >> x;
    flag[x] = 1;
    ++CNT;
  }
  for (int i = 1; i < n; ++i) {
    int x, y, v;
    cin >> x >> y >> v;
    ch[x].push_back(y);
    ch[y].push_back(x);
    c[x].push_back(v);
    c[y].push_back(v);
  }
  dfs1(1, 0);
  dfs2(1, 0);
  dfs3(1, 0);
  dfs4(1, 0);
  for (int i = 1; i <= n; ++i)
    if (!flag[i])
      if (ans[i] > Max)
        Max = ans[i], cnt = 1;
      else if (ans[i] == Max)
        ++cnt;
  cout << Max << " " << cnt << endl;
  return 0;
}
