#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;
}
