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