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;
long long down[maxn], up[maxn], head_down[maxn], head_up[maxn],
    root[maxn][MAX_LG], h[maxn], dp[maxn];
bool fl[maxn];
struct edge {
  long long u, c;
  edge() {}
  edge(long long u, long long c) : u(u), c(c) {}
};
vector<edge> g[maxn];
inline void calc(long long node, long long fa = 0) {
  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;
      calc(u.u, node);
    }
  }
}
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];
}
inline void dfs_down(long long node, long long fa = 0) {
  for (auto u : g[node]) {
    if (u.u - fa) {
      dfs_down(u.u, node);
      if (down[u.u] == -1) continue;
      if (down[u.u] + u.c > down[node])
        head_down[node] = head_down[u.u], down[node] = down[u.u] + u.c;
      else if (down[u.u] + u.c == down[node])
        head_down[node] = node;
    }
  }
}
long long pref_maxi[maxn], suf_maxi[maxn], pref_head[maxn], suf_head[maxn];
inline void dfs_up(long long node, long long fa = 0, long long theLen = 0) {
  if (fa && up[fa] != -1) {
    if (up[node] < up[fa] + theLen) {
      up[node] = up[fa] + theLen;
      head_up[node] = head_up[fa];
    } else if (up[node] == up[fa] + theLen) {
      head_up[node] = fa;
    }
  }
  for (long long i = 0; i < g[node].size(); i++) {
    long long u = g[node][i].u, c = g[node][i].c;
    if (u == fa) {
      if (i == 0)
        pref_maxi[i] = pref_head[i] = -1;
      else
        pref_head[i] = pref_head[i - 1], pref_maxi[i] = pref_maxi[i - 1];
    } else {
      if (i == 0) {
        pref_maxi[i] = down[u] == -1 ? -1 : down[u] + c;
        pref_head[i] = head_down[u];
      } else {
        if (down[u] != -1) {
          if (down[u] + c == pref_maxi[i - 1])
            pref_head[i] = node;
          else if (down[u] + c < pref_maxi[i - 1])
            pref_head[i] = pref_head[i - 1];
          else
            pref_head[i] = head_down[u];
          pref_maxi[i] = max(pref_maxi[i - 1], down[u] + c);
        } else
          pref_head[i] = pref_head[i - 1], pref_maxi[i] = pref_maxi[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].c;
    if (u == fa) {
      if (i + 1 == g[node].size())
        suf_maxi[i] = suf_head[i] = -1;
      else
        suf_head[i] = suf_head[i + 1], suf_maxi[i] = suf_maxi[i + 1];
    } else {
      if (i + 1 == g[node].size()) {
        suf_maxi[i] = down[u] == -1 ? -1 : down[u] + c;
        suf_head[i] = head_down[u];
      } else {
        if (down[u] != -1) {
          if (down[u] + c == suf_maxi[i + 1])
            suf_head[i] = node;
          else if (down[u] + c < suf_maxi[i + 1])
            suf_head[i] = suf_head[i + 1];
          else
            suf_head[i] = head_down[u];
          suf_maxi[i] = max(suf_maxi[i + 1], down[u] + c);
        } else
          suf_maxi[i] = suf_maxi[i + 1], suf_head[i] = suf_head[i + 1];
      }
    }
  }
  for (long long i = 0; i < g[node].size(); i++) {
    long long u = g[node][i].u, c = g[node][i].c;
    if (u == fa) continue;
    long long MAXIMUM = max(i ? pref_maxi[i - 1] : 0,
                            i + 1 < g[node].size() ? suf_maxi[i + 1] : 0);
    if (MAXIMUM <= 0)
      continue;
    else {
      if (i && i + 1 < g[node].size()) {
        if (pref_maxi[i - 1] == suf_maxi[i + 1])
          head_up[u] = node;
        else if (pref_maxi[i - 1] > suf_maxi[i + 1])
          head_up[u] = pref_head[i - 1];
        else
          head_up[u] = suf_head[i + 1];
      } else if (i)
        head_up[u] = pref_head[i - 1];
      else if (i + 1 < g[node].size())
        head_up[u] = suf_head[i + 1];
    }
    up[u] = MAXIMUM + c;
  }
  for (long long i = 0; i < g[node].size(); i++) {
    long long u = g[node][i].u, c = g[node][i].c;
    if (u == fa) continue;
    dfs_up(u, node, c);
  }
}
inline void add(long long v, long long u) {
  dp[v]++;
  dp[u]++;
  long long LCA = lca(v, u);
  dp[LCA]--;
  dp[root[LCA][0]]--;
}
inline void sumup(long long node, long long fa = 0) {
  for (auto u : g[node]) {
    if (u.u - fa) sumup(u.u, node), dp[node] += dp[u.u];
  }
}
int32_t main() {
  long long n = in(), m = in();
  for (long long i = 0; i < maxn; i++) down[i] = up[i] = -1;
  for (long long i = 0; i < m; i++) {
    long long id = in();
    fl[id] = true;
    down[id] = up[id] = 0;
    head_down[id] = head_up[id] = id;
  }
  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});
  }
  calc(1);
  dfs_down(1);
  dfs_up(1);
  for (long long i = 1; i <= n; i++) {
    if (fl[i]) {
      if (down[i] == up[i]) continue;
      if (down[i] > up[i])
        add(i, head_down[i]);
      else
        add(i, head_up[i]);
    }
  }
  sumup(1);
  long long res = 0, maxi = -1;
  for (long long i = 1; i <= n; i++) {
    if (!fl[i]) {
      if (dp[i] > maxi)
        maxi = dp[i], res = 1;
      else if (dp[i] == maxi)
        res++;
    }
  }
  cout << maxi << " " << res << "\n";
}
