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 maxn = 1e5 + 500;
const long long mod = 1e9 + 7;
const long long inf = 1e9 + 500;
long long ans[maxn];
vector<pair<long long, long long> > ger[maxn];
pair<long long, long long> par[maxn];
long long parr[maxn][20];
vector<pair<long long, long long> > child[maxn];
long long dpd[maxn];
long long kidpd[maxn];
long long dpu[maxn];
long long kidpu[maxn];
set<pair<long long, pair<long long, long long> > > st[maxn];
bool vis[maxn];
bool mark[maxn];
long long stim[maxn];
long long etim[maxn];
long long timee = 0;
void dfs_set_par(long long a) {
  vis[a] = 1;
  stim[a] = timee;
  timee++;
  for (long long i = 0; i < ger[a].size(); i++) {
    long long v = ger[a][i].first;
    if (vis[v] == 0) {
      parr[v][0] = a;
      child[a].push_back(ger[a][i]);
      par[v] = make_pair(a, ger[a][i].second);
      dfs_set_par(v);
    }
  }
  etim[a] = timee;
  timee++;
}
bool is_par(long long a, long long b) {
  if (stim[a] <= stim[b] && etim[a] >= etim[b]) {
    return 1;
  }
  return 0;
}
long long lca(long long a, long long b) {
  if (is_par(a, b)) {
    return a;
  }
  if (is_par(b, a)) {
    return b;
  }
  for (long long i = 19; i >= 0; i--) {
    if (!is_par(parr[a][i], b)) {
      a = parr[a][i];
    }
  }
  return parr[a][0];
}
void dfs_up(long long a) {
  if (a != 0) {
    long long v = par[a].first;
    long long w = par[a].second;
    dpu[a] = dpu[v] + w;
    set<pair<long long, pair<long long, long long> > >::iterator it =
        st[v].end();
    it--;
    while (1) {
      if ((*it).second.first != a) {
        dpu[a] = max(((*it).first) + w, dpu[a]);
        break;
      }
      if (it == st[v].begin()) {
        break;
      }
      it--;
    }
    kidpu[a] = -5;
    if (dpu[a] == dpu[v] + w) {
      kidpu[a] = kidpu[v];
    }
    it = st[v].end();
    it--;
    while (1) {
      if ((*it).second.first != a) {
        if ((*it).first + w < dpu[a]) {
          break;
        }
        if ((*it).first + w == dpu[a]) {
          if (kidpu[a] != -5) {
            kidpu[a] = v;
            break;
          } else {
            kidpu[a] = kidpd[(*it).second.first];
          }
        }
      }
      if (it == st[v].begin()) {
        break;
      }
      it--;
    }
  }
  for (long long i = 0; i < child[a].size(); i++) {
    long long v = child[a][i].first;
    dfs_up(v);
  }
}
void dfs_dpd(long long a) {
  dpd[a] = -inf;
  kidpd[a] = a;
  if (mark[a]) {
    dpd[a] = 0;
    st[a].insert(make_pair(0, make_pair(maxn - 10, a)));
  }
  for (long long i = 0; i < child[a].size(); i++) {
    long long v = child[a][i].first;
    dfs_dpd(v);
    long long u = dpd[v] + child[a][i].second;
    st[a].insert(make_pair(u, make_pair(v, kidpd[v])));
    if (dpd[a] < u) {
      dpd[a] = u;
      kidpd[a] = kidpd[v];
    } else if (dpd[a] == u) {
      kidpd[a] = a;
    }
  }
}
void dfs_ans(long long a) {
  for (long long i = 0; i < child[a].size(); i++) {
    dfs_ans(child[a][i].first);
    ans[a] += ans[child[a][i].first];
  }
}
int main() {
  long long n, k;
  cin >> n >> k;
  for (long long i = 0; i < k; i++) {
    long long v;
    cin >> v;
    v--;
    mark[v] = 1;
  }
  for (long long i = 0; i < n - 1; i++) {
    long long v, u, w;
    cin >> v >> u >> w;
    v--;
    u--;
    ger[u].push_back(make_pair(v, w));
    ger[v].push_back(make_pair(u, w));
  }
  parr[0][0] = 0;
  par[0] = make_pair(maxn - 10, -1);
  dfs_set_par(0);
  for (long long i = 1; i < 20; i++) {
    for (long long j = 0; j < n; j++) {
      parr[j][i] = parr[parr[j][i - 1]][i - 1];
    }
  }
  dfs_dpd(0);
  dpu[0] = -inf;
  kidpu[0] = 0;
  dfs_up(0);
  for (long long i = 0; i < n; i++) {
    if (mark[i]) {
      if (dpd[i] == dpu[i]) {
        ans[i]++;
        ans[par[i].first]--;
      } else if (dpd[i] > dpu[i]) {
        ans[par[i].first]--;
        ans[kidpd[i]]++;
      } else {
        ans[i]++;
        ans[kidpu[i]]++;
        long long v = lca(i, kidpu[i]);
        ans[v]--;
        ans[par[v].first]--;
      }
    }
  }
  dfs_ans(0);
  long long maxx = 0;
  long long t = 0;
  for (long long i = 0; i < n; i++) {
    if (mark[i] == 0) {
      if (ans[i] > maxx) {
        t = 1;
        maxx = ans[i];
      } else if (ans[i] == maxx) {
        t++;
      }
    }
  }
  cout << maxx << " " << t << endl;
}
