#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;
}
