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>
#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) {
  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;
}
