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;
vector<pair<int, int> > E[100010];
int n, m, a[100010], A, vis[100010], x, y, z, root, dis[100010], D[100010], tot,
    pre[100010], L[100010], Bl[100010];
int ans[100010], S[100010];
pair<int, int> Fr[100010];
bool exist[100010], is[100010];
int F[100010];
queue<int> h;
map<int, int> Le, Ri;
void read(int &x) {
  char ch = getchar();
  int mark = 1;
  for (; ch != '-' && (ch < '0' || ch > '9'); ch = getchar())
    ;
  if (ch == '-') mark = -1, ch = getchar();
  for (x = 0; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - 48;
  x *= mark;
}
void dfs(int u) {
  vis[u] = A;
  int s = 0;
  for (int i = 0; i < E[u].size(); i++) {
    int v = E[u][i].first;
    s++;
    if (vis[v] == A) continue;
    dfs(v);
    if (!exist[v]) s--;
  }
  exist[u] = (s > 1) || is[u];
}
int Far(int u) {
  vis[u] = ++A;
  dis[u] = pre[u] = 0;
  h.push(u);
  pair<int, int> Max = make_pair(0, u);
  while (h.size()) {
    int u = h.front();
    h.pop();
    for (int i = 0; i < E[u].size(); i++) {
      int v = E[u][i].first, l = E[u][i].second;
      if (vis[v] != A && exist[v]) {
        vis[v] = A;
        dis[v] = dis[u] + l;
        pre[v] = u;
        Max = max(Max, make_pair(dis[v], v));
        h.push(v);
      }
    }
  }
  return Max.second;
}
void Find(int u) {
  u = Far(u);
  int far = Far(u);
  for (; far; far = pre[far]) D[++tot] = far, L[tot] = dis[far];
}
void Dfs(int u, int st) {
  vis[u] = A;
  Bl[u] = st;
  for (int i = 0; i < E[u].size(); i++) {
    int v = E[u][i].first;
    if (vis[v] != A && exist[v]) dis[v] = dis[u] + E[u][i].second, Dfs(v, st);
  }
}
void Add(int l, int r) {
  ans[l]++;
  ans[r]++;
  if (Bl[l] > Bl[r]) swap(l, r);
  S[Bl[l]]++;
  S[Bl[r] + 1]--;
}
void DFS(int u) {
  vis[u] = A;
  for (int i = 0; i < E[u].size(); i++) {
    int v = E[u][i].first;
    if (vis[v] != A) DFS(v), ans[u] += ans[v];
  }
}
int main() {
  read(n);
  read(m);
  for (int i = 1; i <= m; i++) {
    read(a[i]);
    is[a[i]] = 1;
  }
  for (int i = 1; i < n; i++) {
    read(x);
    read(y);
    read(z);
    E[x].push_back(make_pair(y, z));
    E[y].push_back(make_pair(x, z));
  }
  A++;
  dfs(1);
  root = a[1];
  Find(root);
  A++;
  for (int i = 1; i <= tot; i++) vis[D[i]] = A;
  for (int i = 1; i <= tot; i++) dis[D[i]] = 0, Dfs(D[i], i);
  for (int i = 1; i <= tot; i++) F[i] = max(L[i], L[1] - L[i]);
  for (int i = 1; i <= m; i++) {
    int x = Bl[a[i]], u = a[i], t;
    Fr[x] = max(Fr[x], make_pair(dis[u], u));
    if (L[x] >= L[1] - L[x]) {
      t = max(Le[L[x] + dis[u]], x);
      Le[L[x] + dis[u]] = t;
    }
    if (L[x] <= L[1] - L[x]) {
      t = Ri[-L[x] + dis[u]];
      Ri[-L[x] + dis[u]] = (t == 0) ? x : min(t, x);
    }
  }
  for (int i = 1; i <= m; i++) {
    int x = Bl[a[i]], u = a[i], t;
    if (L[x] > L[1] - L[x]) {
      t = Ri[F[x] - L[x]];
      Add(u, Fr[t].second);
    } else if (L[x] < L[1] - L[x]) {
      t = Le[F[x] + L[x]];
      Add(u, Fr[t].second);
    } else
      Add(u, D[x]);
  }
  A++;
  for (int i = 1; i <= tot; i++) vis[D[i]] = A;
  for (int i = 1; i <= tot; i++) DFS(D[i]);
  for (int i = 1; i <= tot; i++) S[i] = S[i - 1] + S[i];
  for (int i = 1; i <= tot; i++) ans[D[i]] = S[i];
  int Max = 0, Sum = 0;
  for (int i = 1; i <= n; i++)
    if (!is[i]) {
      if (Max < ans[i])
        Max = ans[i], Sum = 1;
      else if (Max == ans[i])
        Sum++;
    }
  printf("%d %d\n", Max, Sum);
  return 0;
}
