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;
inline int in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
inline string get() {
  char ch[2000010];
  scanf("%s", ch);
  return ch;
}
const int MAX_LG = 21;
const long long maxn = 1e5 + 10;
const long long base = 29;
const long long mod = 1e9 + 7;
const long long INF = 1e10 + 100;
bool has[maxn];
long long h[maxn];
long long root[maxn][MAX_LG];
struct cn {
  long long u, w;
  cn() {}
  cn(long long u, long long w) : u(u), w(w) {}
};
vector<cn> g[maxn];
long long sz[maxn];
inline void getsz(long long node, long long fa = 0) {
  sz[node] += has[node];
  root[node][0] = fa;
  for (long long i = 1; i < MAX_LG; i++)
    root[node][i] = root[root[node][i - 1]][i - 1];
  for (auto u : g[node]) {
    if (u.u - fa) {
      h[u.u] = h[node] + 1;
      getsz(u.u, node), sz[node] += sz[u.u];
    }
  }
}
inline long long lca(long long p, long long q) {
  if (h[p] < h[q]) swap(p, q);
  for (long long i = MAX_LG - 1; i >= 0; i--)
    if (h[p] - (1 << i) >= h[q]) p = root[p][i];
  if (p == q) return p;
  for (long long i = MAX_LG - 1; i >= 0; i--)
    if (root[p][i] != root[q][i]) p = root[p][i], q = root[q][i];
  return root[p][0];
}
long long down_maxi[maxn], up_maxi[maxn];
long long pref[maxn], nodes[maxn];
long long en[maxn], en2[maxn];
inline void dfs_down(long long node, long long fa = -1) {
  long long cur = 0;
  for (auto u : g[node]) {
    if (u.u == fa || sz[u.u] == 0) continue;
    dfs_down(u.u, node);
  }
  for (auto u : g[node]) {
    if (u.u == fa || sz[u.u] == 0) continue;
    pref[cur++] = down_maxi[u.u] + u.w;
    nodes[cur - 1] = u.u;
  }
  if (cur) {
    long long maxi = *max_element(pref, pref + cur);
    long long cnt = count(pref, pref + cur, maxi);
    down_maxi[node] = maxi;
    if (cnt > 1)
      en[node] = node;
    else
      for (long long i = 0; i < cur; i++)
        if (pref[i] == maxi) en[node] = en[nodes[i]];
  }
}
long long suf[maxn];
long long cnt_pref[maxn], cnt_suf[maxn];
long long prefId[maxn], sufId[maxn];
inline void dfs_up(long long node, long long fa = -1) {
  for (long long i = 0; i < g[node].size(); i++) {
    long long u = g[node][i].u, c = g[node][i].w;
    long long xxx = down_maxi[u] > -INF ? down_maxi[u] + c : -INF;
    if (u == fa) {
      if (i) {
        pref[i] = pref[i - 1], cnt_pref[i] = cnt_pref[i - 1];
        prefId[i] = prefId[i - 1];
      } else {
        pref[i] = -INF, cnt_pref[i] = 0;
        prefId[i] = -1;
      }
    } else {
      pref[i] = max(xxx, i ? pref[i - 1] : -INF);
      cnt_pref[i] = (i ? (cnt_pref[i - 1] * bool(pref[i] == pref[i - 1])) : 0) +
                    bool(xxx == pref[i]);
      prefId[i] = (xxx == pref[i] ? en[u] : prefId[i - 1]);
    }
  }
  for (long long i = (long long)g[node].size() - 1; i >= 0; i--) {
    long long u = g[node][i].u, c = g[node][i].w;
    long long xxx = down_maxi[u] > -INF ? down_maxi[u] + c : -INF;
    if (u == fa) {
      if (i + 1 < g[node].size()) {
        suf[i] = suf[i + 1], cnt_suf[i] = cnt_suf[i + 1];
        sufId[i] = sufId[i + 1];
      } else {
        suf[i] = -INF, cnt_suf[i] = 0;
        sufId[i] = -1;
      }
    } else {
      suf[i] = max(xxx, i + 1 < g[node].size() ? suf[i + 1] : -INF);
      cnt_suf[i] =
          (i + 1 < g[node].size() ? cnt_suf[i + 1] * bool(suf[i] == suf[i + 1])
                                  : 0) +
          bool(xxx == suf[i]);
      sufId[i] = (xxx == suf[i] ? en[u] : sufId[i + 1]);
    }
  }
  for (long long i = 0; i < g[node].size(); i++) {
    long long u = g[node][i].u, c = g[node][i].w;
    if (u == fa) continue;
    long long MAXIMUM =
        max(i ? pref[i - 1] : -INF, i + 1 < g[node].size() ? suf[i + 1] : -INF);
    long long cnt_MAXIMUM =
        (i ? cnt_pref[i - 1] * bool(MAXIMUM == pref[i - 1]) : 0) +
        (i + 1 < g[node].size() ? cnt_suf[i + 1] * bool(MAXIMUM == suf[i + 1])
                                : 0);
    if (MAXIMUM > -INF && cnt_MAXIMUM > 1) {
      en2[u] = node;
    } else {
      if (up_maxi[node] > MAXIMUM) {
        en2[u] = en2[node];
      } else if (up_maxi[node] > -INF && up_maxi[node] == MAXIMUM) {
        en2[u] = node;
      } else {
        assert(MAXIMUM > -INF);
        if (i && pref[i - 1] == MAXIMUM) {
          en2[u] = prefId[i - 1];
        } else {
          en2[u] = sufId[i + 1];
        }
      }
    }
    up_maxi[u] = max(up_maxi[u], max(up_maxi[node], MAXIMUM) > -INF
                                     ? max(up_maxi[node], MAXIMUM) + c
                                     : -INF);
  }
  for (auto u : g[node]) {
    if (u.u - fa) dfs_up(u.u, node);
  }
}
long long dp[maxn];
inline void add(long long v, long long u) {
  dp[v]++;
  dp[u]++;
  long long LCA = lca(v, u);
  dp[root[LCA][0]] -= 1;
  dp[LCA] -= 1;
}
inline void sumup(long long node, long long fa = -1) {
  for (auto u : g[node]) {
    if (u.u == fa) continue;
    sumup(u.u, node);
    dp[node] += dp[u.u];
  }
}
int32_t main() {
  for (long long i = 0; i < maxn; i++) {
    en[i] = en2[i] = i;
    down_maxi[i] = -INF;
    up_maxi[i] = -INF;
  }
  long long n = in(), m = in();
  for (long long i = 0; i < m; i++) has[in()] = true;
  for (long long i = 1; i <= n; i++)
    if (has[i]) up_maxi[i] = down_maxi[i] = 0;
  for (long long i = 0; i < n - 1; i++) {
    long long v = in(), u = in(), c = in();
    g[v].push_back({u, c});
    g[u].push_back({v, c});
  }
  getsz(1);
  dfs_down(1);
  dfs_up(1);
  for (long long i = 1; i <= n; i++) {
    if (has[i]) {
      if (down_maxi[i] == up_maxi[i]) continue;
      if (down_maxi[i] > up_maxi[i])
        add(i, en[i]);
      else
        add(i, en2[i]);
    }
  }
  sumup(1);
  long long maxi = -1;
  long long res = 0;
  for (long long i = 1; i <= n; i++)
    if (!has[i]) {
      if (dp[i] > maxi) {
        res = 1;
        maxi = dp[i];
      } else if (dp[i] == maxi) {
        res++;
      }
    }
  cout << maxi << " " << res << "\n";
}
