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>
template <typename T>
void checkmax(T &a, T b) {
  if (a < b) a = b;
}
enum { n_max = 110000 };
struct Edge {
  int b, c;
};
int n, m;
int hd, c;
std::vector<Edge> G[n_max];
bool M[n_max];
int D[n_max];
int Dc[n_max], Mc[n_max];
int P[n_max];
void premium(int v, int p, int u) {
  if (Dc[v] + Dc[u] == Dc[c]) {
    P[v] = Mc[u];
    for (Edge &e : G[v])
      if (e.b != p) premium(e.b, v, u);
  }
}
void count(int v, int p) {
  for (Edge &e : G[v])
    if (e.b != p) {
      count(e.b, v);
      Mc[v] += Mc[e.b];
      Dc[v] += Dc[e.b];
    }
  if (M[v]) Mc[v]++;
  if (D[v] == hd) Dc[v]++;
}
void dist(int v, int p) {
  if (v == p) D[v] = 0;
  for (Edge e : G[v])
    if (e.b != p) {
      D[e.b] = D[v] + e.c;
      dist(e.b, v);
    }
}
int furthest() {
  int v = 0;
  for (int i = 0; i < (n); ++i)
    if (D[v] < D[i]) v = i;
  return v;
}
void center() {
  int u, v;
  dist(0, 0);
  v = furthest();
  dist(v, v);
  v = furthest();
  u = v;
  hd = D[v] / 2;
  while (1) {
    for (Edge e : G[v])
      if (D[e.b] < D[u]) u = e.b;
    if (D[u] <= hd) break;
    v = u;
  }
  if (D[u] == hd) {
    c = u;
    return;
  }
  for (Edge &e : G[v])
    if (e.b == u) {
      e.b = n;
      e.c = std::abs(D[v] - hd);
    }
  for (Edge &e : G[u])
    if (e.b == v) {
      e.b = n;
      e.c = std::abs(D[u] - hd);
    }
  G[n].push_back(Edge({u, std::abs(D[u] - hd)}));
  G[n].push_back(Edge({v, std::abs(D[v] - hd)}));
  D[n] = hd;
  M[n] = 1;
  c = n++;
}
void print() {
  for (int i = 0; i < (n); ++i) {
    printf("%d: ", i);
    for (Edge &e : G[i]) printf("%d(%d) ", e.b, e.c);
    puts("");
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (m); ++i) {
    int x;
    scanf("%d", &x);
    M[--x] = 1;
  }
  for (int i = 0; i < (n - 1); ++i) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    a--;
    b--;
    G[a].push_back(Edge({b, c}));
    G[b].push_back(Edge({a, c}));
  }
  center();
  dist(c, c);
  count(c, c);
  std::vector<int> B;
  for (Edge &e : G[c])
    if (Dc[e.b]) B.push_back(e.b);
  if (B.size() == 2)
    for (int i = 0; i < (2); ++i) premium(B[i], c, B[!i]);
  int res = -1, rc = 0;
  for (int i = 0; i < (n); ++i)
    if (!M[i]) {
      int x = Mc[i] + P[i];
      if (res == x) rc++;
      if (res < x) {
        res = x;
        rc = 1;
      }
    }
  printf("%d %d\n", res, rc);
  return 0;
}
