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 Tp>
void in(Tp &x) {
  char ch = getchar(), f = 1;
  x = 0;
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= f;
}
template <typename Tp>
Tp Max(const Tp &x, const Tp &y) {
  return x > y ? x : y;
}
template <typename Tp>
Tp Min(const Tp &x, const Tp &y) {
  return x < y ? x : y;
}
template <typename Tp>
bool chkmax(Tp &x, Tp y) {
  return x >= y ? 0 : (x = y, 1);
}
template <typename Tp>
bool chkmin(Tp &x, Tp y) {
  return x <= y ? 0 : (x = y, 1);
}
const int MAXN = 300010, inf = 0x3f3f3f3f;
int n, m;
bool vis[MAXN];
int f[MAXN][3], g[MAXN][3], h[MAXN], fa[MAXN], times[MAXN];
int cnt;
int head[MAXN], data[MAXN << 1], flow[MAXN << 1], nxt[MAXN << 1];
void dfs1(int now, int pa) {
  f[now][0] = f[now][1] = f[now][2] = -inf;
  for (int i = head[now]; i != -1; i = nxt[i]) {
    if (data[i] == pa) continue;
    dfs1(data[i], now);
    if (chkmax(f[now][0], f[data[i]][0] + flow[i])) g[now][0] = data[i];
  }
  for (int i = head[now]; i != -1; i = nxt[i]) {
    if (data[i] == pa || data[i] == g[now][0]) continue;
    if (chkmax(f[now][1], f[data[i]][0] + flow[i])) g[now][1] = data[i];
  }
  for (int i = head[now]; i != -1; i = nxt[i]) {
    if (data[i] == pa || data[i] == g[now][0] || data[i] == g[now][1]) continue;
    if (chkmax(f[now][2], f[data[i]][0] + flow[i])) g[now][2] = data[i];
  }
  if (vis[now] && f[now][0] < 0) f[now][0] = 0, g[now][0] = now;
}
void dfs2(int now, int pa, int tree) {
  fa[now] = pa;
  h[now] = -inf;
  if (now != 1) {
    if (vis[pa]) h[now] = tree;
    chkmax(h[now], h[pa] + tree);
    if (g[pa][0] != now)
      chkmax(h[now], f[pa][0] + tree);
    else
      chkmax(h[now], f[pa][1] + tree);
  }
  for (int i = head[now]; i != -1; i = nxt[i]) {
    if (data[i] != pa) dfs2(data[i], now, flow[i]);
  }
}
int dn[MAXN], val[MAXN];
void move_chain(int top, int bot, int lca) {
  val[lca]--;
  if (lca != 1) val[fa[lca]]--;
  val[bot]++;
  val[top]++;
}
int dfs3(int now, int pa) {
  int nxtx;
  for (int i = head[now]; i != -1; i = nxt[i])
    if (data[i] != pa)
      if (data[i] == g[now][0])
        nxtx = dfs3(data[i], now);
      else
        dfs3(data[i], now);
  if (f[now][0] < 0 || !f[now][0]) return dn[now] = now;
  if (f[g[now][0]][0] == f[g[now][0]][1])
    dn[now] = g[now][0];
  else
    dn[now] = nxtx;
  if (h[now] < f[now][0] && vis[now]) move_chain(g[now][0], dn[now], g[now][0]);
  return dn[now];
}
void dfs4(int now, int pa, int up, int pre) {
  if (now == 1) {
    for (int i = head[now]; i != -1; i = nxt[i])
      if (data[i] != pa) dfs4(data[i], now, 1, 0);
    return;
  }
  if (up == pa) pre = now;
  if (g[pa][0] == now && f[pa][1] >= h[pa] ||
      g[pa][0] != now && f[pa][0] >= h[pa])
    up = pa, pre = now;
  if (h[now] > f[now][0] && vis[now]) {
    int bot;
    if (g[up][0] == pre && f[up][1] < 0)
      bot = up;
    else {
      if ((g[up][0] == pre && (f[up][1] == f[up][2] || f[up][1] == h[up])) ||
          (g[up][1] == pre && (f[up][0] == f[up][2] || f[up][0] == h[up])) ||
          (g[up][0] != pre && g[up][1] != pre &&
           (f[up][0] == f[up][1] || f[up][0] == h[up])))
        bot = up;
      else {
        if (g[up][0] == pre)
          bot = dn[g[up][1]];
        else
          bot = dn[g[up][0]];
      }
    }
    move_chain(bot, fa[now], up);
  }
  for (int i = head[now]; i != -1; i = nxt[i])
    if (data[i] != pa) dfs4(data[i], now, up, pre);
}
void calc_ans(int now, int pa) {
  times[now] = val[now];
  for (int i = head[now]; i != -1; i = nxt[i]) {
    if (data[i] != pa) {
      calc_ans(data[i], now);
      times[now] += times[data[i]];
    }
  }
}
void add(int x, int y, int z) {
  nxt[cnt] = head[x];
  data[cnt] = y;
  flow[cnt] = z;
  head[x] = cnt++;
  nxt[cnt] = head[y];
  data[cnt] = x;
  flow[cnt] = z;
  head[y] = cnt++;
}
int main() {
  in(n);
  in(m);
  memset(head, -1, sizeof head);
  for (int i = (1), i_END_ = (m); i <= i_END_; i++) {
    int x;
    in(x);
    vis[x] = true;
  }
  for (int i = (1), i_END_ = (n - 1); i <= i_END_; i++) {
    int x, y, z;
    in(x);
    in(y);
    in(z);
    add(x, y, z);
  }
  dfs1(1, 0);
  dfs2(1, 0, 0);
  dfs3(1, 0);
  dfs4(1, 0, 1, 0);
  calc_ans(1, 0);
  int maxx = -1, tot = 0;
  for (int i = (1), i_END_ = (n); i <= i_END_; i++)
    if (!vis[i]) chkmax(maxx, times[i]);
  printf("%d ", maxx);
  for (int i = (1), i_END_ = (n); i <= i_END_; i++)
    if (!vis[i] && times[i] == maxx) tot++;
  printf("%d\n", tot);
  return 0;
}
