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;
template <class T>
inline T min(T &a, T &b) {
  return a < b ? a : b;
}
template <class T>
inline T max(T &a, T &b) {
  return a > b ? a : b;
}
template <class T>
void read(T &x) {
  char ch;
  while ((ch = getchar()) && !isdigit(ch))
    ;
  x = ch - '0';
  while ((ch = getchar()) && isdigit(ch)) x = x * 10 + ch - '0';
}
struct point {
  int x, y;
  point() {}
  point(int _x, int _y) : x(_x), y(_y) {}
};
const int N = 120000;
vector<int> E[N], F[N];
pair<int, int> Son[N], O[N], T[N];
vector<pair<int, int> > P;
int f[N][21], n, dep[N], Ol, val[N], ax, ay, pil[N], m;
void dp() {
  for (int j = 1; j <= 20; j++)
    for (int i = 1; i <= n; i++) f[i][j] = f[f[i][j - 1]][j - 1];
}
void dfs_son(int w, int Fa) {
  Son[w] = make_pair(0, w);
  f[w][0] = Fa;
  dep[w] = dep[Fa] + 1;
  for (int i = 0; i < E[w].size(); i++)
    if (E[w][i] != Fa) {
      dfs_son(E[w][i], w);
      if (Son[E[w][i]].first + F[w][i] > Son[w].first)
        Son[w] = make_pair(Son[E[w][i]].first + F[w][i], Son[E[w][i]].second);
      else
        Son[w] = make_pair(Son[w].first, w);
    }
}
int lca(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  for (int i = 18; i >= 0; i--)
    if (dep[f[x][i]] >= dep[y]) x = f[x][i];
  if (x == y) return x;
  for (int i = 18; i >= 0; i--)
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  return f[x][0];
}
int up(int x, int c) {
  for (int i = 0; i <= 20; i++)
    if (c & (1 << i)) x = f[x][i];
  return x;
}
void Insert(int x, int y) {
  int z = lca(x, y);
  if (z == x)
    P.push_back(make_pair(x, y));
  else {
    P.push_back(make_pair(z, x));
    P.push_back(make_pair(up(y, dep[y] - dep[z] - 1), y));
  }
}
void dfs_fa(int w, int Fa, pair<int, int> c) {
  if (c.first > Son[w].first && pil[w]) Insert(c.second, w);
  Ol = 0;
  O[++Ol] = c;
  for (int i = 0; i < E[w].size(); i++)
    if (E[w][i] != Fa)
      O[++Ol] = make_pair(Son[E[w][i]].first + F[w][i], E[w][i]);
  sort(O + 1, O + Ol + 1);
  for (int i = 0; i < E[w].size(); i++)
    if (E[w][i] != Fa) {
      int Max = -1, gs = 0, p = 0;
      for (int j = Ol; j >= 1; j--)
        if (O[j].second != E[w][i]) {
          if (O[j].first > Max)
            Max = O[j].first, p = Son[O[j].second].second, gs++;
          else if (O[j].first == Max)
            gs++;
          else
            break;
          if (gs >= 2) break;
        }
      if (gs == 2 || gs == 0)
        T[E[w][i]] = make_pair(Max + F[w][i], w);
      else if (gs == 1)
        T[E[w][i]] = make_pair(Max + F[w][i], p);
    }
  for (int i = 0; i < E[w].size(); i++)
    if (E[w][i] != Fa) dfs_fa(E[w][i], w, T[E[w][i]]);
}
void update() {
  for (int i = 0; i < P.size(); i++) {
    int x = P[i].first, y = P[i].second, z = up(y, dep[y] - dep[x] - 1);
    val[x]++;
    for (int j = 0; j < E[x].size(); j++)
      if (E[x][j] != z && E[x][j] != f[x][0]) val[E[x][j]]--;
    for (int j = 0; j < E[y].size(); j++)
      if (E[y][j] != f[y][0]) val[E[y][j]]--;
  }
}
void solve(int w, int Fa, int s = 0) {
  s += val[w];
  if (!pil[w]) {
    if (s > ax)
      ax = s, ay = 1;
    else if (s == ax)
      ay++;
  }
  for (int i = 0; i < E[w].size(); i++)
    if (E[w][i] != Fa) solve(E[w][i], w, s);
  s -= val[w];
}
int main() {
  scanf("%d%d", &n, &m);
  int x, y, z;
  for (int i = 1; i <= m; i++) scanf("%d", &x), pil[x] = 1;
  for (int i = 1; i <= n - 1; i++)
    scanf("%d%d%d", &x, &y, &z), E[x].push_back(y), E[y].push_back(x),
        F[x].push_back(z), F[y].push_back(z);
  dfs_son(1, 0);
  dfs_fa(1, 0, make_pair(0, 0));
  dp();
  update();
  solve(1, 0, 0);
  printf("%d %d\n", ax, ay);
}
