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;
bool get(bool a, bool b, pair<bool, bool> form) {
  return (a ^ form.first) | (b ^ form.second);
}
template <typename T>
ostream& operator<<(ostream& out, array<T, 2> a) {
  return out << '[' << a[0] << ' ' << a[1] << ']';
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  return out << '(' << a.first << ", " << a.second << ')';
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> a) {
  out << '[';
  for (auto i : a) out << i << " ";
  return out << ']';
}
vector<bool> mon;
vector<vector<pair<int, int>>> G;
vector<int> maxch, par, head, sum;
vector<pair<int, int>> maxds;
pair<int, int> operator+(pair<int, int> a, int b) {
  return {a.first + b, a.second};
}
vector<pair<int, int>> pid;
int _c = 0;
pair<int, pair<int, int>> dfs0(int i, int p) {
  int sz = 1;
  pair<int, int> mxch = {0, 0}, ds = {mon[i] ? 0 : INT_MIN, i};
  par[i] = p;
  pid[i].first = _c++;
  for (auto [x, w] : G[i])
    if (x != p) {
      auto ans = dfs0(x, i);
      if (ds.first == ans.second.first + w)
        ds.second = i;
      else if (ds.first < ans.second.first + w)
        ds = ans.second + w;
      mxch = max(mxch, make_pair(ans.first, x));
      sz += ans.first;
    }
  maxds[i] = ds;
  maxch[i] = mxch.second;
  pid[i].second = _c++;
  return {sz, ds};
}
vector<int> pos, ord;
void dfs1(int i, int p, int ch, pair<int, int> upans) {
  if (mon[i]) upans = max(upans, make_pair(0, i));
  pos[i] = ord.size();
  ord.push_back(i);
  head[i] = ch;
  vector<pair<int, int>> v;
  if (upans.first >= maxds[i].first) v.push_back(upans);
  for (auto [x, w] : G[i])
    if (x != p && maxds[x].first + w == maxds[i].first &&
        maxds[x].first + w >= upans.first)
      v.push_back(maxds[x] + w);
  if (v.size() == 1 &&
      (v.push_back(upans.first < maxds[i].first ? upans
                                                : (pair<int, int>){INT_MIN, 0}),
       1))
    for (auto [x, w] : G[i])
      if (x != p)
        if (maxds[x].first + w < maxds[i].first &&
            maxds[x].first + w > v[1].first)
          v[1] = maxds[x] + w;
        else if (maxds[x].first + w == v[1].first)
          v[1].second = i;
  if (v.size() >= 3) v[0].second = i;
  auto getans = [&](int x, int w) {
    if (maxds[x].first + w != maxds[i].first)
      return v[1].first == v[0].first ? make_pair(v[0].first, i) : v[0];
    return maxds[x] + w == v[0] ? v[1] : v[0];
  };
  for (auto [x, w] : G[i])
    if (x == maxch[i]) dfs1(x, i, ch, getans(x, w) + w);
  for (auto [x, w] : G[i])
    if (x != maxch[i] && x != p) dfs1(x, i, x, getans(x, w) + w);
  if (maxds[i].first == upans.first) maxds[i].second = i;
  if (maxds[i].first < upans.first) maxds[i] = upans;
}
bool isPar(int a, int b) {
  return !a || pid[a].first < pid[b].first && pid[a].second > pid[b].second;
}
void sets(int i, int j) {
  while (head[i] != head[j]) {
    if (!isPar(head[i], j))
      sum[pos[head[i]]]++, sum[pos[i] + 1]--, i = par[head[i]];
    swap(i, j);
  }
  if (pos[i] > pos[j]) swap(i, j);
  sum[pos[i]]++, sum[pos[j] + 1]--;
}
signed main() {
  int n, m;
  cin >> n >> m;
  mon.resize(n + 1);
  G.resize(n + 1);
  maxch.resize(n + 1);
  maxds.resize(n + 1);
  pos.resize(n + 1);
  ord.push_back(0);
  par.resize(n + 1);
  head.resize(n + 1);
  pid.resize(n + 1);
  sum.resize(n + 2);
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    mon[a] = true;
  }
  for (int i = 1; i < n; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    G[a].push_back({b, c});
    G[b].push_back({a, c});
  }
  dfs0(1, 1);
  dfs1(1, 1, 1, {INT_MIN, 1});
  for (int i = 1; i <= n; i++)
    if (mon[i]) sets(i, maxds[i].second);
  for (int i = 0; i <= n; i++) sum[i + 1] += sum[i];
  for (int i = 1; i <= n; i++)
    if (mon[i]) sum[pos[i]] = -1;
  sum[0] = sum[n + 1] = -1;
  cout << *max_element((sum).begin(), (sum).end()) << " "
       << count((sum).begin(), (sum).end(),
                *max_element((sum).begin(), (sum).end()))
       << endl;
}
