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 inf = ~0U >> 1;
const long long INF = ~0ULL >> 1;
template <class T>
inline void read(T &n) {
  char c;
  for (c = getchar(); !(c >= '0' && c <= '9'); c = getchar())
    ;
  n = c - '0';
  for (c = getchar(); c >= '0' && c <= '9'; c = getchar()) n = n * 10 + c - '0';
}
int Pow(int base, int n, int mo) {
  if (n == 0) return 1;
  if (n == 1) return base % mo;
  int tmp = Pow(base, n >> 1, mo);
  tmp = (long long)tmp * tmp % mo;
  if (n & 1) tmp = (long long)tmp * base % mo;
  return tmp;
}
const int maxn = 120000;
pair<int, int> f[maxn][2], g[maxn], dp[maxn];
int n, m, x, y, w, Ret, Cnt;
int cru[maxn], dep[maxn], faw[maxn], s[maxn], fa[maxn], lca[maxn][20];
vector<pair<int, int> > E[maxn];
int LCA(int x, int y) {
  if (dep[x] < dep[y]) swap(x, y);
  for (int j = (18); j >= (0); --j)
    if (dep[lca[x][j]] >= dep[y]) x = lca[x][j];
  if (x == y) return x;
  for (int j = (18); j >= (0); --j)
    if (lca[x][j] != lca[y][j]) x = lca[x][j], y = lca[y][j];
  return lca[x][0];
}
void add(int x, int y) {
  int lca = LCA(x, y);
  s[x]++;
  s[y]++;
  s[lca]--;
  s[fa[lca]]--;
}
void dfs(int u, int par) {
  dp[u] = f[u][0] = f[u][1] = (make_pair(-1, -1));
  fa[u] = par;
  dep[u] = dep[par] + 1;
  lca[u][0] = par;
  if (cru[u]) dp[u] = (make_pair(0, u));
  for (int i = (0); i < (E[u].size()); ++i)
    if (E[u][i].first != par) {
      int v = E[u][i].first, w = E[u][i].second;
      faw[v] = w;
      dfs(v, u);
      if (dp[v].second == -1) continue;
      if (dp[v].first + w > f[u][0].first) {
        f[u][1] = f[u][0];
        f[u][0] = dp[v];
        f[u][0].first += w;
      } else if (dp[v].first + w == f[u][0].first &&
                 dp[v].first + w > f[u][1].first) {
        f[u][1] = dp[v];
        f[u][1].first += w;
      }
      if (dp[v].first + w > dp[u].first) {
        dp[u] = dp[v];
        dp[u].first += w;
      } else if (dp[v].first + w == dp[u].first)
        dp[u].second = u;
    }
}
void dfs2(int u) {
  g[u] = (make_pair(-1, -1));
  if (cru[u]) g[u] = (make_pair(0, u));
  if (fa[u] && g[fa[u]].second != -1 && g[fa[u]].first + faw[u] > g[u].first) {
    g[u] = g[fa[u]];
    g[u].first += faw[u];
  }
  if (fa[u]) {
    for (int k = (0); k <= (1); ++k)
      if (f[fa[u]][k].second != dp[u].second && f[fa[u]][k].second != -1) {
        if (f[fa[u]][k].first + faw[u] > g[u].first) {
          g[u] = f[fa[u]][k];
          g[u].first += faw[u];
        } else if (f[fa[u]][k].first + faw[u] == g[u].first)
          g[u].first = fa[u];
      }
  }
  for (int i = (0); i < (E[u].size()); ++i)
    if (E[u][i].first != fa[u]) dfs2(E[u][i].first);
}
void dfs3(int u) {
  for (int i = (0); i < (E[u].size()); ++i)
    if (E[u][i].first != fa[u]) dfs3(E[u][i].first);
  s[fa[u]] += s[u];
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (1); i <= (m); ++i) scanf("%d", &x), cru[x] = 1;
  for (int i = (1); i <= (n - 1); ++i) {
    scanf("%d%d%d", &x, &y, &w);
    E[x].push_back((make_pair(y, w)));
    E[y].push_back((make_pair(x, w)));
  }
  dfs(1, 0);
  dfs2(1);
  for (int j = (1); j <= (18); ++j)
    for (int i = (1); i <= (n); ++i) lca[i][j] = lca[lca[i][j - 1]][j - 1];
  for (int i = (1); i <= (n); ++i)
    if (cru[i]) {
      if (g[i].second != -1) {
        if (g[i].first == dp[i].first)
          dp[i].second = i;
        else if (g[i].first > dp[i].first)
          dp[i] = g[i];
      }
      add(i, dp[i].second);
    }
  dfs3(1);
  for (int i = (1); i <= (n); ++i)
    if (!cru[i])
      if (s[i] > Ret)
        Ret = s[i], Cnt = 1;
      else if (s[i] == Ret)
        Cnt++;
  printf("%d %d\n", Ret, Cnt);
  return 0;
}
