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