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 const maxn = 1e5 + 5, logg = 18;
vector<pair<int, int> > g[maxn];
int h[maxn], good_h[maxn], goal[maxn], inf = 1e9, best[maxn], last[maxn],
                                       ok[maxn], f[maxn];
int dp[logg][maxn], H[maxn], add[maxn];
void dfs2(int v, int p) {
  for (auto u : g[v]) {
    if (u.first == p) continue;
    dfs2(u.first, v);
    add[v] += add[u.first];
  }
}
void dfs1(int v, int p, int imax, int node) {
  best[v] = goal[v];
  if (imax > good_h[v] - h[v]) best[v] = node;
  set<pair<int, int> > Q;
  for (auto u : g[v]) {
    if (u.first == p) continue;
    Q.insert({good_h[u.first] - h[v], goal[u.first]});
  }
  for (auto u : g[v]) {
    if (u.first == p) continue;
    Q.erase({good_h[u.first] - h[v], goal[u.first]});
    if ((int)Q.size() == 0) {
      dfs1(u.first, v, imax + u.second, node);
    } else {
      auto p = (*Q.rbegin());
      if (p.first < imax)
        dfs1(u.first, v, imax + u.second, node);
      else if (p.first == imax)
        dfs1(u.first, v, imax + u.second, v);
      else {
        Q.erase(p);
        if ((int)Q.size() == 0)
          dfs1(u.first, v, p.first + u.second, p.second);
        else {
          auto lst = (*Q.rbegin());
          if (lst.first == p.first)
            dfs1(u.first, v, p.first + u.second, v);
          else
            dfs1(u.first, v, p.first + u.second, p.second);
        }
        Q.insert(p);
      }
    }
    Q.insert({good_h[u.first] - h[v], goal[u.first]});
  }
}
void dfs(int v, int p) {
  H[v] = H[p] + 1;
  last[v] = p;
  dp[0][v] = p;
  for (int i = 1; i < logg; ++i) dp[i][v] = dp[i - 1][dp[i - 1][v]];
  good_h[v] = -inf, goal[v] = v;
  if (ok[v]) good_h[v] = h[v];
  for (auto u : g[v]) {
    if (u.first == p) continue;
    h[u.first] = h[v] + u.second;
    dfs(u.first, v);
    if (good_h[u.first] > good_h[v]) {
      good_h[v] = good_h[u.first], goal[v] = goal[u.first];
    } else if (good_h[u.first] == good_h[v])
      goal[v] = v;
  }
}
inline int get_la(int v, int x) {
  for (int i = 0; i < logg; ++i)
    if ((x & (1 << i)) > 0) v = dp[i][v];
  return v;
}
inline int get_lca(int v, int u) {
  if (H[v] > H[u])
    v = get_la(v, H[v] - H[u]);
  else
    u = get_la(u, H[u] - H[v]);
  for (int i = logg - 1; i >= 0; --i) {
    if (dp[i][v] != dp[i][u]) v = dp[i][v], u = dp[i][u];
  }
  return dp[0][v];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, x, u, v, w;
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    cin >> x;
    ok[x] = 1;
  }
  for (int i = 1; i < n; ++i) {
    cin >> u >> v >> w;
    g[u].push_back({v, w});
    g[v].push_back({u, w});
  }
  dfs(1, 0);
  dfs1(1, 0, -inf, -1);
  for (int i = 1; i <= n; ++i) {
    if (ok[i]) {
      add[i]++;
      add[best[i]]++;
      add[last[get_lca(i, best[i])]] -= 2;
      f[get_lca(i, best[i])]--;
    }
  }
  dfs2(1, 0);
  int imax = -1, cnt = -1;
  for (int i = 1; i <= n; ++i) {
    if (!ok[i]) {
      add[i] += f[i];
      if (add[i] > imax)
        imax = add[i], cnt = 1;
      else if (add[i] == imax)
        cnt++;
    }
  }
  cout << imax << " " << cnt << '\n';
  return 0;
}
