#include <bits/stdc++.h>
using namespace std;
int to[2 * 100010], nxt[2 * 100010], wei[2 * 100010], head[100010], edge;
int p[100010], par[100010][20], deep[100010];
int mx[100010], po[100010], exmx[100010], expo[100010], ok[100010], val[100010],
    vst[100010];
void add_edge(int u, int v, int c) {
  to[edge] = v;
  nxt[edge] = head[u];
  wei[edge] = c;
  head[u] = edge++;
  to[edge] = u;
  nxt[edge] = head[v];
  wei[edge] = c;
  head[v] = edge++;
  return;
}
void dfs(int u) {
  int v, hop, cnt;
  po[u] = u;
  if (vst[u]) ok[u] = 1;
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    deep[v] = deep[u] + 1;
    p[v] = u;
    dfs(v);
    if (ok[v]) {
      ok[u] = 1;
      mx[u] = max(mx[u], mx[v] + wei[ID]);
    }
  }
  if (!ok[u]) return;
  int ct = 0;
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    if (!ok[v]) continue;
    if (mx[u] == mx[v] + wei[ID]) {
      ct++;
      hop = v;
    }
  }
  if (ct == 1) po[u] = po[hop];
  ct = 0;
  pair<int, int> P[5], PP[5];
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    if (!ok[v]) continue;
    P[ct++] = pair<int, int>(mx[v] + wei[ID], po[v]);
    sort(P, P + ct);
    if (ct == 4) {
      P[0] = P[1];
      P[1] = P[2];
      P[2] = P[3];
      ct = 3;
    }
  }
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    if (!ok[v]) continue;
    for (int i = 0; i < ct; i++) PP[i] = P[i];
    cnt = ct;
    for (int i = 0; i < cnt; i++)
      if (PP[i] == pair<int, int>(mx[v] + wei[ID], po[v])) {
        swap(PP[i], PP[cnt - 1]);
        cnt--;
        break;
      }
    sort(PP, PP + cnt);
    if (cnt == 0) {
      exmx[v] = 0;
      expo[v] = -1;
    } else if (cnt == 1) {
      exmx[v] = PP[0].first;
      expo[v] = PP[0].second;
    } else {
      exmx[v] = PP[cnt - 1].first;
      expo[v] = PP[cnt - 1].second;
      if (PP[cnt - 2].first == PP[cnt - 1].first) expo[v] = u;
    }
  }
  return;
}
int N;
void Init() {
  for (int j = 0; (1 << j) < N; j++)
    for (int i = 0; i < N; i++) par[i][j] = -1;
  for (int i = 0; i < N; i++) par[i][0] = p[i];
  for (int j = 1; (1 << j) < N; j++)
    for (int i = 0; i < N; i++)
      if (par[i][j - 1] != -1) par[i][j] = par[par[i][j - 1]][j - 1];
  return;
}
int lca(int u, int v) {
  if (deep[u] < deep[v]) swap(u, v);
  int log;
  for (log = 0; (1 << log) <= deep[u]; log++)
    ;
  log--;
  for (int i = log; i >= 0; i--)
    if (deep[u] - (1 << i) >= deep[v]) u = par[u][i];
  if (u == v) return u;
  for (int i = log; i >= 0; i--)
    if (par[u][i] != -1 && par[u][i] != par[v][i]) {
      u = par[u][i];
      v = par[v][i];
    }
  return p[u];
}
void calc(int u, int upmx, int up) {
  int v, w;
  if (vst[u]) {
    if (mx[u] > upmx && po[u] != u) {
      v = po[u];
      w = lca(u, v);
      val[u]++;
      val[v]++;
      val[w]--;
      if (p[w] != -1) val[p[w]]--;
    } else if (upmx > mx[u] && up != -1) {
      v = up;
      w = lca(u, v);
      val[u]++;
      val[v]++;
      val[w]--;
      if (p[w] != -1) val[p[w]]--;
    }
  }
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    if (!ok[v]) continue;
    if (exmx[v] > upmx)
      calc(v, exmx[v] + wei[ID], expo[v]);
    else if (upmx > exmx[v])
      calc(v, upmx + wei[ID], up);
    else if (exmx[v] == 0 && vst[u] == 0)
      calc(v, 0, -1);
    else
      calc(v, upmx + wei[ID], u);
  }
  return;
}
void sum(int u) {
  int v;
  for (int ID = head[u]; ID != -1; ID = nxt[ID]) {
    v = to[ID];
    if (v == p[u]) continue;
    sum(v);
    val[u] += val[v];
  }
  return;
}
int main() {
  int M, u, v, c, ans, ct;
  scanf("%d%d", &N, &M);
  for (int i = 0; i < M; i++) {
    scanf("%d", &u);
    u--;
    vst[u] = 1;
  }
  memset(p, 0xff, sizeof(p));
  memset(head, 0xff, sizeof(head));
  for (int i = 0; i < N - 1; i++) {
    scanf("%d%d%d", &u, &v, &c);
    u--;
    v--;
    add_edge(u, v, c);
  }
  dfs(0);
  Init();
  calc(0, 0, -1);
  sum(0);
  ans = 0;
  ct = 0;
  for (int i = 0; i < N; i++)
    if (!vst[i]) ans = max(ans, val[i]);
  for (int i = 0; i < N; i++)
    if (!vst[i] && val[i] == ans) ct++;
  printf("%d %d\n", ans, ct);
  return 0;
}
