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;
struct edge {
  edge* n;
  int v, w;
} E[200000 * 2], *etp = E, *G[200000];
void addedge(int u, int v, int w) {
  etp->v = v;
  etp->w = w;
  etp->n = G[u];
  G[u] = etp++;
  etp->v = u;
  etp->w = w;
  etp->n = G[v];
  G[v] = etp++;
}
int black[200000], n, m, down[200000], dsel[200000], up[200000], usel[200000],
    weight[200000], choose[200000], delta[200000];
const int inf = 1e9;
void prepare(int u, int f) {
  if (black[u])
    down[u] = 0, dsel[u] = u;
  else
    down[u] = -inf, dsel[u] = -1;
  for (edge* e = G[u]; e; e = e->n)
    if (e->v != f) {
      weight[e->v] = e->w;
      prepare(e->v, u);
      if (down[e->v] + e->w > down[u])
        down[u] = down[e->v] + e->w, dsel[u] = dsel[e->v];
      else if (down[e->v] + e->w == down[u])
        dsel[u] = u;
    }
}
pair<int, pair<int, int> > cal[200000];
int size;
int fa[20][200000], dep[200000];
void calcup(int u, int f) {
  fa[0][u] = f;
  dep[u] = dep[f] + 1;
  for (int i = 1; i <= 19; i++) fa[i][u] = fa[i - 1][fa[i - 1][u]];
  size = 0;
  cal[size++] = make_pair(up[u], make_pair(usel[u], usel[u]));
  if (black[u] && up[u] == -inf) cal[0] = make_pair(0, make_pair(u, u));
  for (edge* e = G[u]; e; e = e->n)
    if (e->v != f) {
      cal[size++] = make_pair(down[e->v] + e->w, make_pair(dsel[e->v], e->v));
    }
  sort(cal, cal + size);
  if (cal[size - 1].second.second != usel[u] &&
      cal[size - 1].second.second != u) {
    int v = cal[size - 1].second.second;
    usel[v] = cal[size - 2].second.first;
    up[v] = cal[size - 2].first + weight[v];
  }
  for (int i = 0; i < size - 2; i++) {
    int v = cal[i].second.second;
    if (v == usel[u]) continue;
    if (v == u) continue;
    if (cal[size - 1].first == cal[size - 2].first)
      up[v] = cal[size - 1].first + weight[v], usel[v] = u;
    else
      up[v] = cal[size - 1].first + weight[v],
      usel[v] = cal[size - 1].second.first;
  }
  if (size >= 2) {
    int v = cal[size - 2].second.second;
    if (v != usel[u] && v != u) {
      up[v] = cal[size - 1].first;
      usel[v] = cal[size - 1].second.first;
      if (size >= 3 && cal[size - 3].first == cal[size - 1].first) usel[v] = u;
    }
  }
  for (edge* e = G[u]; e; e = e->n)
    if (e->v != f) calcup(e->v, u);
}
int ans[200000];
int dfs(int u, int f) {
  ans[u] = delta[u];
  for (edge* e = G[u]; e; e = e->n)
    if (e->v != f) ans[u] += dfs(e->v, u);
  return ans[u];
}
int LCA(int u, int v) {
  if (dep[u] > dep[v]) swap(u, v);
  for (int i = 19; i >= 0; i--)
    if (dep[fa[i][v]] > dep[u]) v = fa[i][v];
  if (dep[v] > dep[u]) v = fa[0][v];
  if (u == v) return u;
  for (int i = 19; i >= 0; i--)
    if (fa[i][u] != fa[i][v]) u = fa[i][u], v = fa[i][v];
  return fa[0][u];
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, x; i <= m; i++) scanf("%d", &x), black[x] = 1;
  for (int i = 1, u, v, w; i < n; i++) {
    scanf("%d%d%d", &u, &v, &w);
    addedge(u, v, w);
  }
  prepare(1, 0);
  up[1] = -inf;
  usel[1] = -1;
  calcup(1, 0);
  for (int i = 1; i <= n; i++)
    if (black[i]) {
      if (up[i] > down[i])
        choose[i] = usel[i];
      else if (up[i] < down[i])
        choose[i] = dsel[i];
      else
        choose[i] = i;
      int lca = LCA(i, choose[i]);
      delta[i]++;
      delta[choose[i]]++;
      delta[lca]--;
      delta[fa[0][lca]]--;
    }
  dfs(1, 0);
  int Max = 0, ansCount = 0;
  for (int i = 1; i <= n; i++)
    if (!black[i]) {
      if (ans[i] > Max)
        Max = ans[i], ansCount = 1;
      else if (ans[i] == Max)
        ansCount++;
    }
  cout << Max << " " << ansCount << endl;
}
