#include <bits/stdc++.h>
using namespace std;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= 1000000007;
  for (; b; b >>= 1) {
    if (b & 1) res = res * 1 % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
int fst[100100], nxt[500010], vv[500010], cost[500010], e;
int n, m, is[100100], belong[100100];
int num[100100], mxn[100100];
int mx1[100100], mxp1[100100], mx2[100100], mxp2[100100], dis[100100],
    fa[100100];
map<pair<int, int>, int> mp[100100];
void init() {
  e = 0;
  memset(fst, -1, sizeof fst);
  memset(is, 0, sizeof is);
}
void add(int u, int v, int c) {
  vv[e] = v, nxt[e] = fst[u], cost[e] = c, fst[u] = e++;
  vv[e] = u, nxt[e] = fst[v], cost[e] = c, fst[v] = e++;
}
void clr() {
  memset(dis, 0, sizeof dis);
  memset(mxp1, 0, sizeof mxp1);
}
void dfs1(int u, int f) {
  mx1[u] = -1e9, mx2[u] = -1e9;
  fa[u] = f;
  if (is[u]) mx1[u] = 0, mxp1[u] = u;
  for (int i = fst[u]; ~i; i = nxt[i]) {
    int v = vv[i], c = cost[i];
    if (v == f) continue;
    dis[v] = dis[u] + c;
    dfs1(v, u);
    if (mx1[v] + c > mx1[u]) {
      mx2[u] = mx1[u], mxp2[u] = mxp1[u];
      mx1[u] = mx1[v] + c, mxp1[u] = mxp1[v];
    } else if (mx1[v] + c > mx2[u]) {
      mx2[u] = mx1[v] + c;
      mxp2[u] = mxp1[v];
    }
  }
}
void dfs2(int u, int f) {
  mx1[u] = -1e9, mx2[u] = -1e9;
  if (is[u]) mx1[u] = 0, mxn[u] = 1, mxp1[u] = u;
  for (int i = fst[u]; ~i; i = nxt[i]) {
    int v = vv[i], c = cost[i];
    if (v == f) continue;
    dis[v] = dis[u] + c;
    fa[v] = c;
    dfs2(v, u);
    if (mx1[v] + c > mx1[u])
      mx1[u] = mx1[v] + c, mxn[u] = mxn[v], mxp1[u] = v;
    else if (mx1[v] + c == mx1[u])
      mxn[u] += mxn[v];
  }
}
void dfs3(int u, int f, int o) {
  belong[u] = o;
  if (is[u]) num[u] = 1;
  for (int i = fst[u]; ~i; i = nxt[i]) {
    int v = vv[i];
    if (v == f) continue;
    dfs3(v, u, o);
    num[u] += num[v];
  }
}
int main() {
  scanf("%d%d", &n, &m);
  init();
  for (int i = 1; i <= m; i++) {
    int u;
    scanf("%d", &u);
    is[u] = 1;
  }
  for (int i = 1, u, v, c; i < n; i++) {
    scanf("%d%d%d", &u, &v, &c);
    add(u, v, c);
  }
  dfs1(1, 0);
  int d = -1, p1, p2;
  for (int i = 1; i <= n; i++) {
    if (mx1[i] + mx2[i] > d) {
      d = mx1[i] + mx2[i];
      p1 = mxp1[i];
      p2 = mxp2[i];
    }
  }
  int rt = p1;
  while (fa[rt] && dis[p1] - dis[fa[rt]] <= d / 2) rt = fa[rt];
  clr();
  dfs2(rt, 0);
  for (int i = fst[rt]; ~i; i = nxt[i]) {
    int v = vv[i];
    dfs3(v, rt, v);
  }
  num[rt] = 0;
  int num2 = 0;
  if (is[rt]) num2 = 1, mx2[rt] = 0;
  for (int i = fst[rt]; ~i; i = nxt[i]) {
    int v = vv[i];
    if (v != mxp1[rt]) {
      if (mx1[v] + cost[i] > mx2[rt]) mx2[rt] = mx1[v] + cost[i], num2 = 0;
      if (mx1[v] + cost[i] == mx2[rt]) num2 += mxn[v];
    }
  }
  for (int i = 1; i <= n; i++)
    if (is[i]) {
      int x = 0, y = 0;
      if (mx1[belong[i]] + fa[belong[i]] == mx1[rt]) {
        y = mx2[rt];
        if (mx2[rt] == mx1[rt])
          x = mxn[rt] - mxn[belong[i]];
        else
          x = num2;
      } else {
        y = mx1[rt];
        x = mxn[rt];
      }
      if (i == rt) continue;
      mp[rt][make_pair(y, x)]++, mp[belong[i]][make_pair(y, x)]++;
    }
  int ans = 0, method = 0;
  for (int i = 1; i <= n; i++)
    if (!is[i]) {
      if (i == rt) {
        if (ans == m)
          method++;
        else
          ans = m, method = 1;
        continue;
      }
      int tmp = mp[rt][make_pair(mx1[i] + dis[i], mxn[i])] -
                mp[belong[i]][make_pair(mx1[i] + dis[i], mxn[i])] + num[i];
      if (mxn[i] == mxn[rt] && mx1[i] + dis[i] == mx1[rt]) tmp += is[rt];
      if (tmp > ans)
        ans = tmp, method = 1;
      else if (tmp == ans)
        method++;
    }
  printf("%d %d\n", ans, method);
  return 0;
}
