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 oo = 0x3f3f3f3f;
const double eps = 1e-9;
const int maxn = 100000 + 10;
int n, k;
bool pilgrim[maxn];
vector<pair<int, int> > adj[maxn];
vector<pair<int, int> > tadj[maxn];
vector<int> get_distance(int s) {
  vector<int> dist(n + 1, oo);
  queue<int> q;
  q.push(s);
  dist[0] = dist[s] = 0;
  while (!q.empty()) {
    int cur = q.front();
    q.pop();
    for (auto e : adj[cur]) {
      if (dist[e.first] == oo) {
        dist[e.first] = dist[cur] + e.second;
        q.push(e.first);
      }
    }
  }
  return dist;
}
int melement(vector<int> &d) {
  int ans = 0;
  for (int i = 0; i < (int)d.size(); ++i) {
    if (d[i] != oo && d[i] > d[ans]) ans = i;
  }
  return ans;
}
vector<int> find_center(int root) {
  vector<int> dist1 = get_distance(root);
  int f2 = melement(dist1);
  vector<int> dist2 = get_distance(f2);
  int f1 = melement(dist2);
  dist1 = get_distance(f1);
  int d = dist1[f2];
  for (int i = 1; i <= n; ++i) {
    if (dist1[i] + dist2[i] != d) continue;
    if (dist1[i] * 2 == d) return {i};
    for (auto e : adj[i]) {
      int u = e.first;
      if (dist1[u] + dist2[u] != d) continue;
      int m = dist1[i];
      int M = dist1[u];
      if (m > M) swap(m, M);
      if (2 * m < d && d < 2 * M) return {i, u};
    }
  }
  return {};
}
bool poweroff[maxn];
int tpilgrims[maxn];
vector<int> mid;
int dfs(int s, int f) {
  if (pilgrim[s]) ++tpilgrims[s];
  int md = 0, tmd = 0;
  for (auto e : adj[s])
    if (e.first != f) {
      int u = e.first;
      int d = e.second + dfs(u, s);
      tpilgrims[s] += tpilgrims[u];
      if (d > md) {
        md = d;
        tmd = 0;
        if (f == -1) mid.clear();
      }
      if (d == md) {
        tmd++;
        if (f == -1) mid.push_back(u);
      }
    }
  poweroff[s] = tmd > 1;
  return md;
}
pair<int, int> ans;
void calc2(int s, int f, int r) {
  if (!pilgrim[s]) {
    int t = tpilgrims[s] + r;
    if (t > ans.first) ans = pair<int, int>(t, 0);
    if (t == ans.first) ans.second++;
  }
  if (poweroff[s]) r = 0;
  for (auto e : adj[s])
    if (e.first != f) calc2(e.first, s, r);
}
int counter;
bool buildGraph(int s, int f = -1) {
  bool ok = false;
  if (pilgrim[s]) ok = true;
  for (auto e : tadj[s])
    if (e.first != f) {
      bool c = buildGraph(e.first, s);
      if (c) {
        counter++;
        adj[s].push_back({e.first, e.second});
        adj[e.first].push_back({s, e.second});
        ok = true;
      }
    }
  return ok;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  counter = 0;
  int root = 1;
  for (int i = 0; i < k; ++i) {
    int u;
    cin >> u;
    pilgrim[u] = true;
    root = u;
  }
  for (int i = 1; i < n; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    tadj[u].push_back({v, w});
    tadj[v].push_back({u, w});
  }
  buildGraph(root);
  vector<int> center = find_center(root);
  ans = pair<int, int>(0, n - counter - 1);
  if (center.size() == 1) {
    dfs(center[0], -1);
    if (!pilgrim[center[0]]) ans = pair<int, int>(k, 1);
    assert(mid.size() >= 2);
    if (mid.size() == 2) {
      for (auto e : adj[center[0]]) {
        int u = e.first;
        if (u == mid[0])
          calc2(u, center[0], tpilgrims[mid[1]]);
        else if (u == mid[1])
          calc2(u, center[0], tpilgrims[mid[0]]);
        else
          calc2(u, center[0], 0);
      }
    } else {
      for (auto e : adj[center[0]]) {
        int u = e.first;
        calc2(u, center[0], 0);
      }
    }
  } else {
    dfs(center[0], center[1]);
    dfs(center[1], center[0]);
    calc2(center[0], center[1], tpilgrims[center[1]]);
    calc2(center[1], center[0], tpilgrims[center[0]]);
  }
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
