#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long N = 1e5 + 100, LOG = 20;
const long long INF = 1e9;
vector<pair<long long, long long>> g[N];
bool good[N], can_delete[N];
long long timer = 0;
long long up[N][LOG], tin[N], tout[N], de[N], ans[N], fa[N];
pair<long long, long long> dp[N], down[N];
void dfs0(long long v, long long p) {
  up[v][0] = p;
  fa[v] = p;
  de[v] = de[p] + 1;
  tin[v] = timer++;
  for (long long i = 0; i < (long long)g[v].size(); i++) {
    if (g[v][i].first == p) {
      g[v].erase(g[v].begin() + i);
      break;
    }
  }
  for (long long i = 1; i < LOG; i++) {
    up[v][i] = up[up[v][i - 1]][i - 1];
  }
  for (auto i : g[v]) {
    long long u = i.first, c = i.second;
    if (u == p) continue;
    dfs0(u, v);
  }
  tout[v] = timer;
}
long long par(long long a, long long b) {
  return tin[a] <= tin[b] && tout[b] <= tout[a];
}
long long lca(long long a, long long b) {
  if (par(a, b)) return a;
  if (par(b, a)) return b;
  for (long long i = LOG - 1; i >= 0; i--) {
    if (!par(up[a][i], b)) a = up[a][i];
  }
  return up[a][0];
}
void upd(long long a, long long b) {
  long long c = lca(a, b);
  if (de[a] > de[b]) swap(a, b);
  ans[b] += 1;
  if (c != a) {
    ans[a] += 1;
    ans[c] -= 1;
  }
  if (c != 0) ans[fa[c]] -= 1;
}
void dfs1(long long v) {
  down[v] = {-INF, v};
  if (good[v]) down[v].first = 0;
  for (auto i : g[v]) {
    long long u = i.first, c = i.second;
    dfs1(u);
    auto t = make_pair(down[u].first + c, down[u].second);
    if (t.first < 0) continue;
    if (down[v].first == t.first) {
      down[v].second = v;
      can_delete[v] = 0;
    } else if (down[v].first < t.first) {
      down[v] = t;
      can_delete[v] = 1;
    }
  }
  dp[v] = down[v];
}
void dfs2(long long v, pair<long long, long long> cur) {
  long long n = (long long)g[v].size();
  vector<pair<long long, long long>> pref(n), suf(n);
  auto upd = [&](pair<long long, long long> &a, pair<long long, long long> b) {
    if (a.first == b.first) {
      a.second = v;
    } else if (a.first < b.first) {
      a = b;
    }
  };
  if (dp[v].first == cur.first) {
    can_delete[v] = 0;
  } else if (dp[v].first < cur.first) {
    dp[v] = cur;
    can_delete[v] = 1;
  }
  for (long long i = 0; i < n; i++) {
    long long u = g[v][i].first, c = g[v][i].second;
    pref[i] = {down[u].first + c, down[u].second};
    if (i) {
      upd(pref[i], pref[i - 1]);
    }
  }
  for (long long i = n - 1; i >= 0; i--) {
    long long u = g[v][i].first, c = g[v][i].second;
    suf[i] = {down[u].first + c, down[u].second};
    if (i != n - 1) {
      upd(suf[i], suf[i + 1]);
    }
  }
  if (good[v]) {
    cur = max(cur, {0, v});
  }
  for (long long i = 0; i < n; i++) {
    pair<long long, long long> x = cur;
    if (i) upd(x, pref[i - 1]);
    if (i != n - 1) upd(x, suf[i + 1]);
    long long u = g[v][i].first, c = g[v][i].second;
    x.first += c;
    dfs2(u, x);
  }
}
void dfs3(long long v) {
  for (auto i : g[v]) {
    long long u = i.first, c = i.second;
    dfs3(u);
    ans[v] += ans[u];
  }
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    long long v;
    cin >> v;
    v--;
    good[v] = 1;
    can_delete[v] = 1;
  }
  for (long long i = 1; i < n; i++) {
    long long v, u, c;
    cin >> v >> u >> c;
    v--;
    u--;
    g[v].push_back(make_pair(u, c));
    g[u].push_back(make_pair(v, c));
  }
  de[0] = -1;
  dfs0(0, 0);
  dfs1(0);
  dfs2(0, {good[0] ? 0 : -INF, 0});
  for (long long v = 0; v < n; v++) {
    if (good[v] && can_delete[v]) {
      long long u = dp[v].second;
      upd(v, u);
    }
  }
  dfs3(0);
  long long mx = -1;
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (good[i]) continue;
    if (ans[i] > mx) {
      mx = ans[i];
      cnt = 1;
    } else if (ans[i] == mx) {
      cnt++;
    }
  }
  assert(cnt != 0);
  cout << mx << ' ' << cnt << '\n';
}
