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 N = 1e5 + 10;
int n, m, ip[N], ans[N], g[N], w[N];
int de[N], di[N], f[N][20];
int tot, fi[N], a[N << 1], ne[N << 1], c[N << 1];
bool is_ip[N];
inline void add(int x, int y, int z) {
  a[++tot] = y;
  c[tot] = z;
  ne[tot] = fi[x];
  fi[x] = tot;
}
inline void pre(int x, int fa) {
  de[x] = de[fa] + 1;
  f[x][0] = fa;
  for (int i = 1; i <= 19; ++i) f[x][i] = f[f[x][i - 1]][i - 1];
  for (int i = fi[x]; i; i = ne[i])
    if (a[i] != fa) di[a[i]] = di[x] + c[i], pre(a[i], x);
}
inline int get_lca(int x, int y) {
  if (de[x] < de[y]) swap(x, y);
  for (int i = 19; ~i; --i)
    if (de[f[x][i]] >= de[y]) x = f[x][i];
  if (x == y) return x;
  for (int i = 19; ~i; --i)
    if (f[x][i] != f[y][i]) x = f[x][i], y = f[y][i];
  return f[x][0];
}
inline int get_dis(int x, int y) {
  return di[x] + di[y] - 2 * di[get_lca(x, y)];
}
struct Phi {
  int x, y;
  Phi(int x = 0, int y = 0) : x(x), y(y) {}
  inline void merge(Phi v) {
    if (!v.x) return;
    if (!x) {
      *this = v;
      return;
    }
    int a[4] = {x, y, v.x, v.y};
    for (int i = 0; i < 4; ++i)
      for (int j = i + 1; j < 4; ++j)
        if (get_dis(x, y) < get_dis(a[i], a[j])) x = a[i], y = a[j];
  }
  inline int ask(int v) { return max(get_dis(v, x), get_dis(v, y)); }
} p[N];
inline void set_tag(int x, int y) {
  ++ans[x];
  ++ans[y];
  int t = get_lca(x, y);
  --ans[t];
  --ans[f[t][0]];
}
inline void dfs_tag(int x, int fa) {
  for (int i = fi[x]; i; i = ne[i])
    if (a[i] != fa) dfs_tag(a[i], x), ans[x] += ans[a[i]];
}
inline void get_pre(int x, int fa) {
  g[x] = x;
  p[x] = Phi(0, 0);
  if (is_ip[x]) p[x] = Phi(x, x);
  for (int i = fi[x]; i; i = ne[i])
    if (a[i] != fa) p[x].merge(p[a[i]]);
  if (p[x].x)
    w[x] = p[x].ask(x);
  else
    w[x] = -1e5;
  for (int i = fi[x]; i; i = ne[i])
    if (a[i] != fa && w[a[i]] == w[x] - c[i]) {
      if (g[x] == x)
        g[x] = g[a[i]];
      else {
        g[x] = x;
        return;
      }
    }
}
inline void dfs(int x, int fa) {
  for (int i = fi[x]; i; i = ne[i])
    if (a[i] != fa) dfs(a[i], x);
  get_pre(x, fa);
}
inline void solve(int x, int fa) {
  Phi tpx = p[x], tpfa = p[fa];
  int twx = w[x], twfa = w[fa];
  int tgx = g[x], tgfa = g[fa];
  get_pre(fa, x);
  get_pre(x, 0);
  if (is_ip[x]) set_tag(x, g[x]);
  for (int i = fi[x]; i; i = ne[i])
    if (a[i] != fa) solve(a[i], x);
  p[x] = tpx;
  p[fa] = tpfa;
  w[x] = twx;
  w[fa] = twfa;
  g[x] = tgx;
  g[fa] = tgfa;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) scanf("%d", ip + i), is_ip[ip[i]] = 1;
  for (int i = 1, x, y, z; i < n; ++i)
    scanf("%d%d%d", &x, &y, &z), add(x, y, z), add(y, x, z);
  pre(1, 0);
  dfs(1, 0);
  if (is_ip[1]) set_tag(1, g[1]);
  for (int i = fi[1]; i; i = ne[i]) solve(a[i], 1);
  dfs_tag(1, 0);
  int mx = -1e5, num = 0;
  for (int i = 1; i <= n; ++i)
    if (ans[i] > mx && !is_ip[i])
      mx = ans[i], num = 1;
    else if (ans[i] == mx && !is_ip[i])
      ++num;
  printf("%d %d\n", mx, num);
  return 0;
}
