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;
int N, M;
const int NMax = 200005;
int Mon[NMax], cnt;
int Arb[8 * NMax], First[NMax];
int Partial[8 * NMax];
int Lazy[8 * NMax], Father[23][NMax];
int Log2[NMax], Level[NMax];
vector<pair<int, int> > G[NMax];
int D[NMax], D2[NMax], D3[NMax];
pair<int, int> Low[NMax];
pair<int, int> Up[NMax];
int U[NMax], P[NMax], P2[NMax], P3[NMax];
bool Ok[NMax];
int Paths[NMax];
void precalcLog2() {
  for (int i = 2; i <= N; i++) Log2[i] = Log2[i / 2] + 1;
}
void Read() {
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= M; i++) scanf("%d", &Mon[i]), Ok[Mon[i]] = 1;
  for (int i = 1; i < N; i++) {
    int x, y, c;
    scanf("%d%d%d", &x, &y, &c);
    G[x].push_back(make_pair(y, c));
    G[y].push_back(make_pair(x, c));
  }
}
void DFS(int node, int father) {
  Father[0][node] = father;
  Level[node] = Level[father] + 1;
  First[node] = ++cnt;
  Partial[cnt] = Partial[cnt - 1] + 1;
  int nb = 0;
  for (int i = 0; i < G[node].size(); i++) {
    int neighb = G[node][i].first, cost = G[node][i].second;
    if (neighb == father) continue;
    if (i != 0) ++cnt, Partial[cnt] = Partial[cnt - 1] + 1;
    nb++;
    DFS(neighb, node);
    ++cnt;
    Partial[cnt] = Partial[cnt - 1] - 1;
  }
  if (nb == 0) {
    ++cnt;
    Partial[cnt] = Partial[cnt - 1] - 1;
  }
}
void DFS4(int node, int father) {
  for (int i = 0; i < G[node].size(); i++) {
    int neighb = G[node][i].first;
    if (neighb == father) continue;
    DFS4(neighb, node);
    Paths[node] += Paths[neighb];
  }
}
void precalcFather() {
  for (int i = 1; (1 << i) <= N; i++)
    for (int j = 1; j <= N; j++) Father[i][j] = Father[i - 1][Father[i - 1][j]];
}
int F(int x, int dist) {
  while (dist > 0) {
    int k = Log2[dist];
    x = Father[k][x];
    dist -= (1 << k);
  }
  return x;
}
int LCA(int x, int y) {
  if (Level[x] < Level[y]) swap(x, y);
  x = F(x, Level[x] - Level[y]);
  if (x == y) return x;
  for (int k = Log2[N]; k >= 0; k--) {
    if (Father[k][x] != Father[k][y]) {
      x = Father[k][x];
      y = Father[k][y];
    }
  }
  return Father[0][x];
}
void DFS2(int node, int father) {
  if (Ok[node] == 0)
    D[node] = D2[node] = -1000000000;
  else
    P[node] = node, Low[node] = make_pair(node, node);
  int poz = 0;
  for (int i = 0; i < G[node].size(); i++) {
    int neighb = G[node][i].first, cost = G[node][i].second;
    if (neighb == father) continue;
    DFS2(neighb, node);
    if (D[node] < D[neighb] + cost) {
      P3[node] = P2[node];
      P2[node] = P[node];
      D3[node] = D2[node];
      D2[node] = D[node];
      poz = neighb;
      P[node] = P[neighb];
      D[node] = D[neighb] + cost;
    } else {
      if (D2[node] < D[neighb] + cost) {
        D3[node] = D2[node];
        P3[node] = P2[node];
        D2[node] = D[neighb] + cost;
        P2[node] = P[neighb];
      } else if (D3[node] < D[neighb] + cost) {
        D3[node] = D[neighb] + cost;
        P3[node] = P[neighb];
      }
    }
  }
  if (D[node] == D2[node] && D[node] > 0) {
    Low[node] = make_pair(node, node);
  }
  if (D[node] != D2[node]) Low[node] = make_pair(node, Low[poz].second);
}
void DFS3(int node, int father) {
  for (int i = 0; i < G[node].size(); i++) {
    int neighb = G[node][i].first, cost = G[node][i].second;
    if (neighb == father) continue;
    if (D[neighb] + cost == D[node]) {
      U[neighb] = D2[node] + cost;
      if (D2[node] == D3[node]) {
        Up[neighb] = make_pair(neighb, node);
      } else
        Up[neighb] = make_pair(neighb, P2[node]);
    } else {
      U[neighb] = D[node] + cost;
      if (D[node] == D2[node])
        Up[neighb] = make_pair(neighb, node);
      else
        Up[neighb] = make_pair(neighb, P[node]);
    }
    if (U[neighb] == U[node]) {
      Up[neighb] = make_pair(neighb, node);
    }
    if (U[neighb] < U[node] + cost) {
      U[neighb] = U[node] + cost;
      Up[neighb] = Up[node];
      Up[neighb].first = neighb;
    }
    DFS3(neighb, node);
  }
}
void update(int x, int y) {
  int lca = LCA(x, y);
  Paths[x]++;
  Paths[y]++;
  Paths[lca]--;
  Paths[Father[0][lca]]--;
}
void Solve() {
  for (int i = 1; i <= M; i++) {
    int x = Mon[i];
    if (D[x] == U[x]) continue;
    if (D[x] < U[x]) {
      update(Up[x].first, Up[x].second);
    }
    if (D[x] > U[x]) update(Low[x].first, Low[x].second);
  }
  int Max = -1, cnt = 0;
  DFS4(1, 0);
  for (int i = 1; i <= N; i++) {
    if (Ok[i] == 1) continue;
    int sum = Paths[i];
    if (sum == Max) ++cnt;
    if (sum > Max) {
      Max = sum;
      cnt = 1;
    }
  }
  cout << Max << " " << cnt << "\n";
}
int main() {
  Read();
  precalcLog2();
  DFS(1, 0);
  precalcFather();
  DFS2(1, 0);
  for (int i = 1; i <= N; i++) U[i] = -1000000000;
  DFS3(1, 0);
  Solve();
  return 0;
}
