#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5, mod = 1e9 + 7, inf = 1e18;
int n, m, dep[maxn], h[maxn], ps[maxn], par[20][maxn], pw2[20];
bool mrk[maxn];
vector<pair<int, int> > adj[maxn];
pair<int, int> d0[maxn], d1[maxn];
int get_par(int v, int d) {
  for (int i = 0; i < 20; i++) {
    if ((d & pw2[i]) == 0) continue;
    v = par[i][v];
  }
  return v;
}
int lca(int u, int v) {
  if ((u == 0) || (v == 0)) return 0;
  if (h[u] > h[v]) swap(u, v);
  if (h[u] < h[v]) v = get_par(v, h[v] - h[u]);
  if (u == v) return u;
  for (int i = 19; i >= 0; i--) {
    if (par[i][u] == par[i][v]) continue;
    u = par[i][u];
    v = par[i][v];
  }
  return par[0][u];
}
void dfs(int u) {
  for (int i = 1; i < 20; i++) {
    int v = par[i - 1][u];
    if ((v == 0) || (par[i - 1][v] == 0)) break;
    par[i][u] = par[i - 1][v];
  }
  for (pair<int, int> j : adj[u]) {
    int v = j.first, w = j.second;
    if (v == par[0][u]) continue;
    h[v] = h[u] + 1ll;
    par[0][v] = u;
    dfs(v);
    pair<int, int> pl = {-inf, 0};
    if (mrk[v]) pl = {w, v};
    if (pl.first < d0[v].first + w) pl = {d0[v].first + w, d0[v].second};
    if (pl.first == d0[u].first)
      d0[u].second = u;
    else if (pl.first > d0[u].first)
      d0[u] = pl;
    if (d0[u].first < -mod) d0[u] = {-inf, 0};
  }
}
void dfs2(int u) {
  set<pair<int, int> > s;
  for (pair<int, int> j : adj[u]) {
    int v = j.first, w = j.second;
    if (v == par[0][u]) continue;
    if (d0[v].first > 0) s.insert({d0[v].first + w, d0[v].second});
    if (mrk[v]) s.insert({w, v});
  }
  for (pair<int, int> j : adj[u]) {
    int v = j.first, w = j.second;
    if (v == par[0][u]) continue;
    if (d0[v].first > 0) s.erase({d0[v].first + w, d0[v].second});
    if (mrk[v]) s.erase({w, v});
    pair<int, int> P = {-inf, 0};
    if (s.size()) P = (*s.rbegin());
    if (P.first < d1[u].first) {
      d1[v] = {d1[u].first + w, d1[u].second};
      dep[v] = dep[u];
    } else if (P.first == d1[u].first) {
      dep[v] = u;
      d1[v] = {d1[u].first + w, lca(d1[u].second, P.second)};
    } else {
      dep[v] = u;
      s.erase(P);
      if (s.size()) {
        if ((*s.rbegin()).first == P.first)
          d1[v] = {P.first + w, u};
        else
          d1[v] = {P.first + w, P.second};
      } else
        d1[v] = {P.first + w, P.second};
      s.insert(P);
    }
    if (d0[v].first > 0) s.insert({d0[v].first + w, d0[v].second});
    if (mrk[v]) s.insert({w, v});
    if (mrk[u]) {
      if (w > d1[v].first) {
        dep[v] = u;
        d1[v] = {w, u};
      }
    }
    if (d1[v].first < -mod) d1[v] = {-inf, 0};
    dfs2(v);
  }
}
pair<int, int> ans;
void DFS(int u) {
  for (pair<int, int> j : adj[u]) {
    int v = j.first;
    if (v == par[0][u]) continue;
    DFS(v);
    ps[u] += ps[v];
  }
  if (mrk[u]) return;
  if (ans.first < ps[u])
    ans = {ps[u], 1};
  else if (ans.first == ps[u])
    ans.second++;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  pw2[0] = 1;
  for (int i = 1; i < 20; i++) pw2[i] = (pw2[i - 1ll] * 2ll);
  cin >> n >> m;
  while (m--) {
    int u;
    cin >> u;
    mrk[u] = 1;
  }
  for (int i = 1; i < n; i++) {
    int u, v, w;
    cin >> u >> v >> w;
    adj[u].push_back({v, w});
    adj[v].push_back({u, w});
  }
  for (int i = 1; i <= n; i++) d0[i] = {-inf, 0};
  dfs(1);
  for (int i = 1; i <= n; i++) d1[i] = {-inf, 0};
  dfs2(1);
  for (int i = 1; i <= n; i++) {
    if (d0[i].first == d1[i].first) continue;
    if (!mrk[i]) continue;
    if (d0[i].first > d1[i].first) {
      ps[d0[i].second]++;
      ps[par[0][i]]--;
    } else {
      if (h[dep[i]] >= h[d1[i].second]) {
        ps[i]++;
        ps[par[0][dep[i]]]--;
      } else {
        ps[i]++;
        ps[d1[i].second]++;
        ps[dep[i]]--;
        ps[par[0][dep[i]]]--;
      }
    }
  }
  DFS(1);
  cout << ans.first << ' ' << ans.second;
}
