#include <bits/stdc++.h>
#pragma comment(linker, "/stack:32000000")
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
const int maxn = 100010;
vector<int> a[maxn];
vector<int> w[maxn];
bool mon[maxn];
const int cinf = 1000000010;
pair<int, int> d[maxn];
int resv[maxn];
int tin[maxn];
int tout[maxn];
int timer = 0;
const int LOG = 18;
int par[LOG][maxn];
int t1[maxn];
int t2[maxn];
pair<int, int> combine(int v, pair<int, int> p1, pair<int, int> p2) {
  if (p1.first != p2.first) return max(p1, p2);
  p1.second = v;
  return p1;
}
void dfs1(int v, int p) {
  par[0][v] = p == -1 ? v : p;
  tin[v] = timer++;
  d[v] = make_pair(-cinf, v);
  if (mon[v]) d[v].first = 0;
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (to == p) continue;
    dfs1(to, v);
    pair<int, int> cur = d[to];
    cur.first += w[v][i];
    d[v] = combine(v, d[v], cur);
  }
  tout[v] = timer++;
}
void dfs2(int v, int p, pair<int, int> up) {
  if (mon[v]) up = combine(v, up, make_pair(0, v));
  pair<int, int> cur = combine(v, d[v], up);
  resv[v] = cur.second;
  vector<pair<pair<int, int>, int> > curv;
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (to == p) continue;
    pair<int, int> tt = d[to];
    tt.first += w[v][i];
    curv.push_back(make_pair(tt, i));
  }
  sort(curv.begin(), curv.end());
  reverse(curv.begin(), curv.end());
  if (int((curv).size()) > 3) curv.erase(curv.begin() + 3, curv.end());
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (to == p) continue;
    pair<int, int> tmp = up;
    for (int j = 0; j < int((curv).size()); ++j) {
      if (curv[j].second == i) continue;
      tmp = combine(v, tmp, curv[j].first);
    }
    tmp.first += w[v][i];
    dfs2(to, v, tmp);
  }
}
bool isparent(int x, int y) { return tin[x] <= tin[y] && tout[y] <= tout[x]; }
int lca(int x, int y) {
  if (isparent(x, y)) return x;
  if (isparent(y, x)) return y;
  for (int i = LOG - 1; i >= 0; --i)
    if (!isparent(par[i][x], y)) x = par[i][x];
  return par[0][x];
}
int tsum[maxn];
int bestval[maxn];
void dfscalc(int v, int p) {
  tsum[v] += t1[v];
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (to == p) continue;
    dfscalc(to, v);
    tsum[v] += tsum[to];
  }
  bestval[v] = tsum[v];
  tsum[v] += t2[v];
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int x;
    scanf("%d", &x), --x;
    mon[x] = true;
  }
  for (int i = 0; i < n - 1; ++i) {
    int fr, to, cc;
    scanf("%d%d%d", &fr, &to, &cc);
    --fr, --to;
    for (int iter = 0; iter < 2; ++iter) {
      a[fr].push_back(to), w[fr].push_back(cc);
      swap(fr, to);
    }
  }
  dfs1(0, -1);
  dfs2(0, -1, make_pair(-cinf, 0));
  for (int i = 1; i < LOG; ++i)
    for (int j = 0; j < n; ++j) par[i][j] = par[i - 1][par[i - 1][j]];
  for (int i = 0; i < n; ++i) {
    if (!mon[i]) continue;
    int lc = lca(i, resv[i]);
    t1[i]++;
    t1[resv[i]]++;
    t1[lc]--;
    t2[lc]--;
  }
  dfscalc(0, -1);
  map<int, int> mm;
  for (int i = 0; i < n; ++i)
    if (!mon[i]) mm[bestval[i]]++;
  pair<int, int> ans = *mm.rbegin();
  printf("%d %d\n", ans.first, ans.second);
  return 0;
}
