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 MAXN = 100005;
struct Node {
  int dis, idx;
  Node() {}
  Node(int dis, int idx) : dis(dis), idx(idx) {}
  Node operator+(const int& x) const { return Node(dis + x, idx); }
  void upd(Node a, int& u) {
    if (!a.idx) return;
    if (a.dis > dis) {
      dis = a.dis;
      idx = a.idx;
    } else if (a.dis == dis)
      idx = u;
  }
};
vector<pair<int, int> > G[MAXN];
Node dp[MAXN], up[MAXN], L[MAXN], R[MAXN];
int val[MAXN];
int dep[MAXN];
int pos[MAXN];
int pre[MAXN];
int top[MAXN];
int siz[MAXN];
int son[MAXN];
int tree_idx;
int c[MAXN];
int n, m;
void dfs1(int u, int f) {
  siz[u] = 1;
  son[u] = 0;
  up[u] = dp[u] = Node(0, val[u] ? u : 0);
  for (int i = 0; i < G[u].size(); ++i) {
    int v = G[u][i].first;
    if (v == f) continue;
    dep[v] = dep[u] + 1;
    pre[v] = u;
    dfs1(v, u);
    siz[u] += siz[v];
    if (siz[son[u]] < siz[v]) son[u] = v;
    dp[u].upd(dp[v] + G[u][i].second, u);
  }
}
void dfs2(int u, int f) {
  int n = G[u].size();
  L[0] = Node(0, 0);
  R[n - 1] = Node(0, 0);
  for (int i = 1; i < n; ++i) {
    int v = G[u][i - 1].first;
    if (v == f)
      L[i] = L[i - 1];
    else {
      L[i] = L[i - 1];
      L[i].upd(dp[v] + G[u][i - 1].second, u);
    }
  }
  for (int i = n - 2; i >= 0; --i) {
    int v = G[u][i + 1].first;
    if (v == f)
      R[i] = R[i + 1];
    else {
      R[i] = R[i + 1];
      R[i].upd(dp[v] + G[u][i + 1].second, u);
    }
  }
  for (int i = 0; i < n; ++i) {
    int v = G[u][i].first;
    if (v == f) continue;
    Node tmp(0, 0);
    tmp.upd(L[i] + G[u][i].second, u);
    tmp.upd(R[i] + G[u][i].second, u);
    tmp.upd(up[u] + G[u][i].second, u);
    up[v] = tmp;
  }
  for (int i = 0; i < n; ++i) {
    if (G[u][i].first != f) dfs2(G[u][i].first, u);
  }
}
int idx[MAXN];
void rebuild(int u, int top_element) {
  top[u] = top_element;
  pos[u] = ++tree_idx;
  idx[tree_idx] = u;
  if (son[u]) rebuild(son[u], top_element);
  for (int i = 0; i < G[u].size(); ++i) {
    int v = G[u][i].first;
    if (v != pre[u] && v != son[u]) rebuild(v, v);
  }
}
void update(int x, int y) {
  while (top[x] != top[y]) {
    if (dep[top[x]] < dep[top[y]]) swap(x, y);
    c[pos[top[x]]]++;
    c[pos[x] + 1]--;
    x = pre[top[x]];
  }
  if (dep[x] > dep[y]) swap(x, y);
  c[pos[x]]++;
  c[pos[y] + 1]--;
}
void solve() {
  int x, y, v;
  tree_idx = 0;
  for (int i = 1; i <= n; ++i) {
    G[i].clear();
    val[i] = 0;
    c[i] = 0;
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &x);
    val[x] = 1;
  }
  for (int i = 1; i < n; ++i) {
    scanf("%d%d%d", &x, &y, &v);
    G[x].push_back(make_pair(y, v));
    G[y].push_back(make_pair(x, v));
  }
  dfs1(1, 0);
  dfs2(1, 0);
  rebuild(1, 1);
  for (int i = 1; i <= n; ++i)
    if (val[i]) {
      dp[i].upd(up[i], i);
      update(i, dp[i].idx);
    }
  int ans1 = 0, ans2 = 0;
  for (int i = 1; i <= n; ++i) {
    c[i] += c[i - 1];
    if (!val[idx[i]]) {
      if (c[i] > ans1) {
        ans1 = c[i];
        ans2 = 1;
      } else if (c[i] == ans1)
        ++ans2;
    }
  }
  printf("%d %d\n", ans1, ans2);
}
int main() {
  while (~scanf("%d%d", &n, &m)) solve();
  return 0;
}
