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;
const long long inff = 0x3f3f3f3f3f3f3f3f;
int n, m, x, y, z, vis[100008], s, t, deep, pos, dis[100008], rt, fa[100008],
    top[100008], flag[100008], num, sz[100008], ans, res;
vector<pair<int, int> > g[100008];
void dfs(int u, int f, int as) {
  fa[u] = f;
  top[u] = as;
  if (dis[pos] < dis[u] && vis[u]) pos = u;
  for (int i = 0; i < g[u].size(); i++)
    if (g[u][i].first != f) {
      dis[g[u][i].first] = dis[u] + g[u][i].second;
      dfs(g[u][i].first, u, as);
    }
}
void getans(int u) {
  for (int i = 0; i < g[u].size(); i++) {
    if (g[u][i].first == fa[u]) continue;
    getans(g[u][i].first);
    sz[u] += sz[g[u][i].first];
    if (vis[u] || u == rt) continue;
    if (sz[u] > ans)
      ans = sz[u], res = 1;
    else if (sz[u] == ans)
      res++;
  }
}
int main() {
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i(1); i <= (m); ++i) scanf("%d", &x), vis[x] = 1, pos = x;
  for (int i(1); i <= (n - 1); ++i) {
    scanf("%d", &x), scanf("%d", &y), scanf("%d", &z);
    g[x].push_back(pair<int, int>(y, z));
    g[y].push_back(pair<int, int>(x, z));
  }
  dis[pos] = 0, dfs(pos, 0, 0);
  s = pos;
  dis[pos] = 0, dfs(pos, 0, 0);
  t = pos;
  for (rt = fa[t]; dis[rt] > dis[t] / 2; rt = fa[rt])
    ;
  dis[rt] = 0;
  fa[rt] = 0;
  for (int i = 0; i < g[rt].size(); i++) {
    fa[g[rt][i].first] = rt;
    dis[g[rt][i].first] = dis[rt] + g[rt][i].second;
    dfs(g[rt][i].first, rt, g[rt][i].first);
  }
  for (int i(1); i <= (n); ++i)
    if (!flag[top[i]] && vis[i] && dis[i] == dis[t]) ++num, flag[top[i]] = 1;
  for (int i(1); i <= (n); ++i) {
    if (!vis[i]) continue;
    sz[i]++;
    if (top[i] != top[t] && num == 1)
      sz[t]++;
    else if (top[i] == top[s] && num == 2)
      sz[t]++;
    else if (top[i] == top[t] && num <= 2)
      sz[s]++;
  }
  if (!vis[rt]) ans = m, res = 1;
  getans(rt);
  cout << ans << " " << res << endl;
  return 0;
}
