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 = 100005;
int n, m, dis[2][N];
bool p[N];
vector<pair<int, int>> v[N];
void dfs(int pos, int fa, int dis[]) {
  for (auto &i : v[pos])
    if (i.first != fa)
      dis[i.first] = dis[pos] + i.second, dfs(i.first, pos, dis);
}
int rt;
int get_root() {
  dfs(1, 0, dis[0]);
  int t1 = 0;
  for (int i = 1; i <= n; i++)
    if (p[i] && dis[0][i] > dis[0][t1]) t1 = i;
  dis[0][t1] = 0;
  dfs(t1, 0, dis[0]);
  int t2 = 0;
  for (int i = 1; i <= n; i++)
    if (p[i] && dis[0][i] > dis[0][t2]) t2 = i;
  dfs(t2, 0, dis[1]);
  int mn = INT_MAX, pos = 0;
  for (int i = 1; i <= n; i++)
    if (dis[0][i] + dis[1][i] == dis[1][t1]) {
      int d = abs(dis[0][i] - dis[1][i]);
      if (d < mn) mn = d, pos = i;
    }
  return pos;
}
int cnt[N], dp[N], cc[N], id[N];
void dfs2(int pos, int fa, int d) {
  if (fa == rt)
    id[pos] = pos;
  else
    id[pos] = id[fa];
  cnt[pos] = p[pos];
  for (auto &i : v[pos])
    if (i.first != fa)
      dfs2(i.first, pos, d + i.second), cnt[pos] += cnt[i.first];
  if (cnt[pos]) {
    dp[pos] = d;
    cc[pos] = 1;
    for (auto &i : v[pos])
      if (i.first != fa) {
        if (dp[pos] < dp[i.first])
          dp[pos] = dp[i.first], cc[pos] = cc[i.first];
        else if (dp[pos] == dp[i.first])
          cc[pos] += cc[i.first];
      }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  int t1, t2, t3;
  for (int i = 1; i <= m; i++) cin >> t1, p[t1] = 1;
  for (int i = 1; i < n; i++) {
    cin >> t1 >> t2 >> t3;
    v[t1].push_back({t2, t3});
    v[t2].push_back({t1, t3});
  }
  rt = get_root();
  dfs2(rt, 0, 0);
  int mx1 = 0, mx2 = 0, id1 = 0, id2 = 0, mxcnt = 0;
  for (auto &i : v[rt]) {
    if (!cnt[i.first]) continue;
    if (dp[i.first] > mx1)
      mx2 = mx1, mx1 = dp[i.first];
    else if (dp[i.first] > mx2)
      mx2 = dp[i.first];
  }
  for (auto &i : v[rt]) {
    if (!cnt[i.first]) continue;
    if (dp[i.first] == mx1) ++mxcnt, id1 = i.first;
    if (dp[i.first] == mx2 && !id2) id2 = i.first;
  }
  if (mxcnt > 2) id1 = id2 = 0;
  int ans1 = 0, ans2 = 0;
  if (!p[rt]) ans1 = m, ans2 = 1;
  for (int i = 1; i <= n; i++) {
    if (i == rt || p[i]) continue;
    int ret = cnt[i], tmp = id[i];
    if (ret && dp[i] == dp[tmp] && cc[tmp] == cc[i]) {
      if (tmp == id1) {
        if (mx1 != mx2)
          ret += m - cnt[tmp];
        else
          ret += cnt[id2];
      } else if (tmp == id2)
        ret += cnt[id1];
    }
    if (ret > ans1)
      ans1 = ret, ans2 = 1;
    else if (ret == ans1)
      ++ans2;
  }
  cout << ans1 << ' ' << ans2 << endl;
  return 0;
}
