#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int from[N], to[N], w[N], st[N], fi[N], ans[N], sz[N], mark[N], bad_up[N],
    par[N], tim;
vector<int> adj[N];
void fix_mx(pair<int, int> &mx1, pair<int, int> &mx2, pair<int, int> &mx3,
            pair<int, int> p) {
  multiset<pair<int, int>, greater<pair<int, int>>> s;
  s.insert(mx1), s.insert(mx2), s.insert(mx3), s.insert(p);
  auto it = s.begin();
  mx1 = *(it++), mx2 = *(it++), mx3 = *(it++);
}
pair<int, int> mx1[N], mx2[N], mx3[N], bad_down[N], mx_up[N];
void fix_bad_down(int v) {
  bad_down[v] = {v, v};
  if (mx1[v].second != -1)
    bad_down[v] = {bad_down[mx1[v].second].first, mx1[v].second};
  if (mx1[v].first == mx2[v].first) bad_down[v] = {v, v};
}
int is_par(int p, int v) { return (st[p] <= st[v] && fi[p] >= fi[v]); }
void dfs_down(int p, int v) {
  par[v] = p;
  st[v] = tim++;
  mx1[v] = mx2[v] = mx3[v] = {-1, -1};
  if (mark[v]) sz[v]++, mx1[v] = {0, -1};
  for (auto i : adj[v]) {
    int u = from[i] + to[i] - v;
    if (u == p) continue;
    dfs_down(v, u);
    sz[v] += sz[u];
    if (sz[u])
      fix_mx(mx1[v], mx2[v], mx3[v], make_pair(mx1[u].first + w[i], u));
  }
  fix_bad_down(v);
  fi[v] = tim;
}
void fix_mx_up(int p, int v, int we) {
  mx_up[v] = {mx_up[p].first + we, mx_up[p].second};
  if (mx1[p].first != mx1[v].first + we) {
    if (mx1[p].first + we > mx_up[v].first)
      mx_up[v].first = mx1[p].first + we, mx_up[v].second = p;
  } else if (mx2[p].first + we > mx_up[v].first)
    mx_up[v].first = mx2[p].first + we, mx_up[v].second = p;
}
void fix_bad_up(int p, int v, int we = 0) {
  int Mx1 = 0, Mx2 = 0;
  if (mx1[p].first == mx1[v].first + we)
    Mx1 = mx2[p].first, Mx2 = mx3[p].first;
  else
    Mx1 = mx1[p].first, Mx2 = mx2[p].first;
  bad_up[v] = -1;
  if (Mx1 < mx_up[p].first)
    bad_up[v] = bad_up[p];
  else if (Mx1 > 0 && (Mx1 == Mx2 || Mx1 == mx_up[p].first))
    bad_up[v] = p;
}
void dfs_up(int p, int v, int we = 0) {
  fix_bad_up(p, v, we);
  fix_mx_up(p, v, we);
  if (p == v) mx_up[v] = {0, v}, bad_up[v] = -1;
  for (auto i : adj[v]) {
    int u = from[i] + to[i] - v;
    if (u == p) continue;
    dfs_up(v, u, w[i]);
  }
}
int dfs_ans(int p, int v) {
  for (auto i : adj[v]) {
    int u = from[i] + to[i] - v;
    if (u != p) ans[v] += dfs_ans(v, u);
  }
  return ans[v];
}
vector<int> p;
void solve() {
  for (auto v : p) {
    if (mx_up[v].first == mx1[v].first) continue;
    if (mx_up[v].first > mx1[v].first) {
      if (bad_up[v] == -1) {
        int lc = mx_up[v].second;
        int u = (is_par(mx1[lc].second, v) ? mx2[lc].second : mx1[lc].second);
        ans[v]++, ans[lc]--, ans[par[lc]]--;
        if (u != -1) ans[bad_down[u].first]++;
      } else
        ans[v]++, ans[par[bad_up[v]]]--;
    } else
      ans[v]--, ans[bad_down[v].first]++;
  }
}
void check_dfs_down(int n) {
  for (int i = 0; i < n; i++) {
    cout << i + 1 << ": mxs -> " << mx1[i].first << " " << mx2[i].first << " "
         << mx3[i].first << " ";
    cout << mx1[i].second + 1 << " " << mx2[i].second + 1 << " "
         << mx3[i].second + 1 << endl;
  }
  for (int i = 0; i < n; i++)
    cout << i + 1 << ": bad_down -> " << bad_down[i].first + 1 << " "
         << bad_down[i].second + 1 << endl;
}
void check_dfs_up(int n) {
  for (int i = 0; i < n; i++)
    cout << i + 1 << ": bad_up -> " << bad_up[i] + 1 << endl;
  for (int i = 0; i < n; i++)
    cout << i + 1 << ": mx_up -> " << mx_up[i].first << " "
         << mx_up[i].second + 1 << endl;
}
int main() {
  ios::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u;
    cin >> u;
    u--;
    p.push_back(u);
    mark[u] = 1;
  }
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v >> w[i];
    u--;
    v--;
    from[i] = v, to[i] = u;
    adj[u].push_back(i);
    adj[v].push_back(i);
  }
  int root = p[0];
  dfs_down(root, root);
  dfs_up(root, root);
  solve();
  dfs_ans(root, root);
  int Ans = 0, ways = 0;
  for (int i = 0; i < n; i++) {
    if (mark[i]) continue;
    if (Ans == ans[i]) ways++;
    if (ans[i] > Ans) Ans = ans[i], ways = 1;
  }
  cout << Ans << " " << ways << endl;
  return 0;
}
