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;
char _;
const int maxN = 100 * 1000 + 5;
const int mod = 1000 * 1000 * 1000 + 9;
const int SQ = 317;
const int maxL = 20;
vector<pair<int, int> > a[maxN], g[maxN];
int deg[maxN], del[maxN];
bool pilgrim[maxN];
int dis[maxN], dad[maxN], mark[maxN];
bool in_ghotr[maxN];
int ertefa[maxN];
void dfs(int v, int par = -1) {
  dad[v] = par;
  for (auto u : g[v])
    if (u.first - par)
      ertefa[u.first] = ertefa[v] + 1, dis[u.first] = dis[v] + u.second,
      dfs(u.first, v);
}
int root, dist[maxN], group[maxN];
void DFS(int v) {
  mark[v] = 1;
  group[v] = root;
  for (auto u : g[v])
    if (mark[u.first] == 0) dist[u.first] = dist[v] + u.second, DFS(u.first);
}
int pos[maxN], neg[maxN];
int cnt[maxN];
int solve(int v, int par = -1) {
  int cur = pos[v];
  for (auto u : g[v]) {
    if (u.first == par) continue;
    cur += solve(u.first, v);
  }
  cnt[v] = cur;
  return cur - neg[v];
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    x--;
    pilgrim[x] = 1;
  }
  for (int i = 1; i < n; i++) {
    int v, u, w;
    cin >> v >> u >> w;
    v--;
    u--;
    a[v].push_back({u, w});
    deg[v]++;
    a[u].push_back({v, w});
    deg[u]++;
  }
  queue<int> q;
  for (int i = 0; i < n; i++)
    if (deg[i] == 1) q.push(i);
  while (q.size()) {
    int v = q.front();
    q.pop();
    if (pilgrim[v]) continue;
    deg[v] = 0;
    del[v] = 1;
    for (auto u : a[v])
      if (del[u.first] == 0) {
        deg[u.first]--;
        if (deg[u.first] == 1) q.push(u.first);
      }
  }
  for (int i = 0; i < n; i++)
    if (!del[i])
      for (auto u : a[i])
        if (del[u.first] == 0) g[i].push_back(u);
  for (int i = 0; i < n; i++)
    if (del[i] == 0) root = i;
  dfs(root);
  int sareghotr = root;
  for (int i = 0; i < n; i++)
    if (del[i] == 0 && dis[i] > dis[sareghotr]) sareghotr = i;
  ertefa[sareghotr] = dis[sareghotr] = 0;
  dfs(sareghotr);
  int taheghotr = root;
  for (int i = 0; i < n; i++)
    if (del[i] == 0 && dis[i] > dis[taheghotr]) taheghotr = i;
  int cur = taheghotr;
  while (cur != -1) {
    in_ghotr[cur] = true;
    mark[cur] = true;
    cur = dad[cur];
  }
  for (int i = 0; i < n; i++) {
    if (in_ghotr[i]) {
      root = i;
      DFS(i);
    }
  }
  int dur = dis[taheghotr];
  int mx = sareghotr, mn = taheghotr;
  for (int i = 0; i < n; i++) {
    if (pilgrim[i] == 0) continue;
    int fasele1 = dis[group[i]] + dist[i];
    int fasele2 = (dur - dis[group[i]]) + dist[i];
    if (fasele1 == dur)
      if (ertefa[mn] > ertefa[group[i]]) mn = group[i];
    if (fasele2 == dur)
      if (ertefa[mx] < ertefa[group[i]]) mx = group[i];
  }
  for (int i = 0; i < n; i++) {
    if (pilgrim[i] == 0) continue;
    int fasele1 = dis[group[i]] + dist[i];
    int fasele2 = (dur - dis[group[i]]) + dist[i];
    if (i == sareghotr || i == taheghotr) continue;
    if (fasele1 == fasele2) {
      pos[i]++;
      neg[group[i]]++;
      continue;
    }
    if (fasele1 > fasele2) {
      if (ertefa[mx] <= ertefa[group[i]])
        pos[i]++, neg[mx]++;
      else {
        pos[i]++;
        neg[group[i]]++;
        pos[mx]++;
        pos[group[i]]--;
      }
    } else {
      pos[i]++;
      neg[group[i]]++;
      if (ertefa[mn] <= ertefa[group[i]])
        neg[mn]++, pos[group[i]]++;
      else
        pos[mn]++, pos[group[i]]--;
    }
  }
  pos[taheghotr]++;
  neg[mx]++;
  pos[mn]++;
  neg[sareghotr]++;
  solve(sareghotr);
  int ans = 0, ted = 0;
  for (int i = 0; i < n; i++)
    if (pilgrim[i] == 0 && del[i] == 0) ans = max(ans, cnt[i]);
  for (int i = 0; i < n; i++)
    if (pilgrim[i] == 0 && del[i] == 0)
      if (cnt[i] == ans) ted++;
  if (ted == 0) ted = 1;
  cout << ans << ' ' << ted << endl;
  return 0;
}
