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 MAXN = 100000 + 10, LOG = 20;
pair<pair<int, int>, int> e[MAXN];
struct Graph {
  int id, next, dis;
  bool flag;
} g[MAXN * LOG * 2];
int n, N, m, tot, st[MAXN * LOG], dis[MAXN * LOG], size[MAXN * LOG],
    bel[MAXN * LOG], opp[MAXN];
bool b[MAXN * LOG];
void Add(int first, int second, int z) {
  g[tot].id = second, g[tot].dis = z, g[tot].flag = true,
  g[tot].next = st[first], st[first] = tot++;
  g[tot].id = first, g[tot].dis = z, g[tot].flag = true,
  g[tot].next = st[second], st[second] = tot++;
}
void init() {
  scanf("%d%d", &n, &m);
  N = n;
  tot = 0;
  for (int i = 1; i <= m; ++i) {
    int first;
    scanf("%d", &first);
    b[first] = true;
  }
  for (int i = 1; i <= n; ++i) bel[i] = i;
  memset(st, -1, sizeof(st));
  tot = 0;
  for (int i = 1; i < n; ++i) {
    int first, second, z;
    scanf("%d%d%d", &first, &second, &z);
    Add(first, second, z);
    e[i] = make_pair(make_pair(first, second), z);
  }
}
int Find_G(int first, int fa, int n) {
  size[first] = 1;
  bool flag = true;
  for (int i = st[first]; i != -1; i = g[i].next)
    if (g[i].flag && g[i].id != fa) {
      int second = Find_G(g[i].id, first, n);
      if (second != -1) return second;
      size[first] += size[g[i].id];
      if (size[g[i].id] > n / 2) flag = false;
    }
  if (flag && n - size[first] <= n / 2) return first;
  return -1;
}
const int INF = 0x3f3f3f3f;
pair<int, int> DFS(int first, int fa) {
  size[first] = 1;
  pair<int, int> Tohka =
      b[first] ? make_pair(dis[first], first) : make_pair(-INF, 0);
  for (int i = st[first]; i != -1; i = g[i].next)
    if (g[i].flag && g[i].id != fa) {
      dis[g[i].id] = dis[first] + g[i].dis;
      pair<int, int> second = DFS(g[i].id, first);
      size[first] += size[g[i].id];
      if (second.first == Tohka.first) Tohka.second = first;
      if (second.first > Tohka.first) Tohka = second;
    }
  return Tohka;
}
void solve(int dep, int first, int n) {
  if (n == 2) {
    for (int i = st[first]; i != -1; i = g[i].next)
      if (g[i].flag) {
        if (first < MAXN) opp[first] = g[i].id;
        if (g[i].id < MAXN) opp[g[i].id] = first;
        break;
      }
    return;
  }
  int G = Find_G(first, 0, n);
  pair<pair<int, int>, int> ent[3];
  memset(ent, 0, sizeof(ent));
  for (int i = 0; i < 3; ++i) ent[i].first.first = -INF;
  if (b[G]) ent[0].first = make_pair(0, G);
  for (int i = st[G]; i != -1; i = g[i].next)
    if (g[i].flag) {
      dis[g[i].id] = g[i].dis;
      pair<pair<int, int>, int> info = make_pair(DFS(g[i].id, G), g[i].id);
      if (ent[0] < info)
        ent[2] = ent[1], ent[1] = ent[0], ent[0] = info;
      else if (ent[1] < info)
        ent[2] = ent[1], ent[1] = info;
      else if (ent[2] < info)
        ent[2] = info;
    }
  int ty = (ent[0].first.first == ent[1].first.first) +
           (ent[0].first.first == ent[2].first.first);
  if (G < MAXN)
    if (ent[0].first.first != ent[1].first.first)
      opp[G] = ent[0].first.second;
    else
      opp[G] = G;
  for (int i = st[G]; i != -1; i = g[i].next)
    if (g[i].flag) {
      if (ent[0].first.first >= 0)
        if (!ty) {
          ++N;
          b[N] = true;
          if (g[i].id == ent[0].second) {
            if (ent[1].first.first >= 0)
              bel[N] = ent[1].first.second,
              Add(g[i].id, N, ent[1].first.first + g[i].dis);
          } else
            bel[N] = ent[0].first.second,
            Add(g[i].id, N, ent[0].first.first + g[i].dis);
        } else if (ty == 1) {
          ++N;
          b[N] = true;
          if (g[i].id != ent[0].second && g[i].id != ent[1].second)
            bel[N] = G, Add(g[i].id, N, ent[0].first.first + g[i].dis);
          else {
            int p = (g[i].id == ent[0].second);
            bel[N] = ent[p].first.second;
            Add(g[i].id, N, ent[0].first.first + g[i].dis);
          }
        } else {
          ++N;
          b[N] = true;
          bel[N] = G;
          Add(g[i].id, N, ent[0].first.first + g[i].dis);
        }
      g[i].flag = g[i ^ 1].flag = false;
      solve(dep + 1, g[i].id, size[g[i].id] + 1);
    }
}
int get_bel(int first) {
  if (bel[first] <= n) return bel[first];
  bel[first] = get_bel(bel[first]);
  return bel[first];
}
int f[MAXN][LOG], Tohka[MAXN], dep[MAXN], c[MAXN];
void Vis(int first, int fa) {
  for (int i = st[first]; i != -1; i = g[i].next)
    if (g[i].id != fa) {
      dep[g[i].id] = dep[first] + 1;
      f[g[i].id][0] = first;
      for (int j = 1; j < LOG; ++j) f[g[i].id][j] = f[f[g[i].id][j - 1]][j - 1];
      Vis(g[i].id, first);
    }
}
int LCA(int first, int second) {
  if (dep[first] > dep[second]) swap(first, second);
  for (int i = LOG - 1; i >= 0; --i)
    if (dep[f[second][i]] >= dep[first]) second = f[second][i];
  if (first == second) return first;
  for (int i = LOG - 1; i >= 0; --i)
    if (f[first][i] != f[second][i]) first = f[first][i], second = f[second][i];
  return f[first][0];
}
void Vis2(int first, int fa) {
  for (int i = st[first]; i != -1; i = g[i].next)
    if (g[i].id != fa) {
      Vis2(g[i].id, first);
      c[first] += c[g[i].id];
    }
  Tohka[first] += c[first];
}
void solve() {
  solve(0, 1, n);
  for (int i = 1; i <= n; ++i) opp[i] = get_bel(opp[i]);
  tot = 0;
  memset(st, -1, sizeof(st));
  for (int i = 1; i < n; ++i)
    Add(e[i].first.first, e[i].first.second, e[i].second);
  Vis(1, 0);
  for (int i = 1; i <= n; ++i)
    if (b[i]) {
      int first = i, second = opp[i], lca = LCA(first, second);
      if (first == second) continue;
      ++Tohka[lca], c[lca] -= 2, ++c[first], ++c[second];
    }
  Vis2(1, 0);
  int Houki = 0, Kurumi = 0;
  for (int i = 1; i <= n; ++i)
    if (!b[i]) {
      if (Tohka[i] > Houki) Houki = Tohka[i], Kurumi = 0;
      Kurumi += (Houki == Tohka[i]);
    }
  cout << Houki << " " << Kurumi << endl;
}
int main() {
  init();
  solve();
  fclose(stdin);
  fclose(stdout);
  return 0;
}
