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;
vector<pair<int, int> > G[200000];
int n;
bool valid[200000];
int vis[200000];
bool mn[200000];
int cdiam[200000];
int treesz[200000];
int getLongest(int v) {
  if (vis[v] != -1) return -1e+9;
  int ans = mn[v] ? 0 : -1e+9;
  vis[v] = -2;
  for (int i = 0; i < G[v].size(); i++) {
    int buf = G[v][i].second + getLongest(G[v][i].first);
    if (buf > ans) {
      ans = buf;
      vis[v] = G[v][i].first;
    }
  }
  return ans;
}
int markdiams(int v, int d) {
  if (vis[v] != -1) return 0;
  vis[v] = 0;
  if (mn[v] && d == 0) return cdiam[v] = 1;
  cdiam[v] = 0;
  for (int i = 0; i < G[v].size(); i++)
    cdiam[v] += markdiams(G[v][i].first, d - G[v][i].second);
  return cdiam[v];
}
int treeszcalc(int v) {
  if (vis[v] != -1) return 0;
  vis[v] = 0;
  int ans = mn[v];
  for (int i = 0; i < G[v].size(); i++) ans += treeszcalc(G[v][i].first);
  return treesz[v] = ans;
}
int m;
int center;
int rad;
int anssz;
int ansv;
void dfssolve(int v, int delta, int brsz) {
  if (vis[v] != -1) return;
  vis[v] = 0;
  int buf = min(m, treesz[v] + delta * (cdiam[v] == brsz));
  if (valid[v] && anssz < buf) {
    anssz = buf;
    ansv = 1;
  } else if (valid[v] && anssz == buf) {
    ansv++;
  }
  for (int i = 0; i < G[v].size(); i++) {
    dfssolve(G[v][i].first, delta, v == center ? cdiam[G[v][i].first] : brsz);
  }
}
int gete(int u, int v) {
  for (int i = 0; i < G[u].size(); i++) {
    if (G[u][i].first == v) return i;
  }
  assert(false);
}
int edgeweight(int u, int v) { return G[u][gete(u, v)].second; }
int edgesplit(int u, int v, int d) {
  int i1 = gete(u, v);
  int i2 = gete(v, u);
  G[n].push_back(make_pair(u, d));
  G[n].push_back(make_pair(v, G[v][i2].second - d));
  G[u][i1] = make_pair(n, d);
  G[v][i2] = make_pair(n, G[v][i2].second - d);
  valid[n] = false;
  return n++;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  memset(valid, 0, sizeof valid);
  fill(valid, valid + n, true);
  memset(mn, 0, sizeof mn);
  for (int i = 0; i < m; ++i) {
    int cc;
    cin >> cc;
    mn[cc - 1] = true;
    valid[cc - 1] = false;
  }
  for (int i = 0; i < n - 1; i++) {
    int u, v, d;
    cin >> u >> v >> d;
    u--;
    v--;
    G[u].push_back(make_pair(v, 2 * d));
    G[v].push_back(make_pair(u, 2 * d));
  }
  int d;
  {
    memset(vis, -1, sizeof vis);
    getLongest(0);
    int v = 0;
    while (vis[v] > 0) v = vis[v];
    memset(vis, -1, sizeof vis);
    d = getLongest(v);
    rad = d / 2;
    int u = v;
    int tmp = rad;
    while (tmp >= edgeweight(u, vis[u])) {
      tmp -= edgeweight(u, vis[u]);
      u = vis[u];
    }
    if (tmp == 0)
      center = u;
    else
      center = edgesplit(u, vis[u], tmp);
  }
  memset(vis, -1, sizeof vis);
  assert(d % 2 == 0);
  assert(d / 2 == getLongest(center));
  memset(vis, -1, sizeof vis);
  vis[center] = 0;
  int branches = 0;
  for (int i = 0; i < G[center].size(); i++)
    branches += markdiams(G[center][i].first, rad - G[center][i].second) > 0;
  anssz = -1;
  memset(vis, -1, sizeof vis);
  treeszcalc(center);
  memset(vis, -1, sizeof vis);
  vis[center] = 0;
  if (valid[center]) {
    anssz = m;
    ansv = 1;
  }
  int ssz = 0;
  for (int i = 0; i < G[center].size(); i++)
    if (cdiam[G[center][i].first] > 0) ssz += treesz[G[center][i].first];
  for (int i = 0; i < G[center].size(); i++) {
    if (cdiam[G[center][i].first] > 0) {
      dfssolve(G[center][i].first,
               branches == 2 ? (ssz - treesz[G[center][i].first]) : 0,
               cdiam[G[center][i].first]);
    } else
      dfssolve(G[center][i].first, 0, 0);
  }
  cout << anssz << " " << ansv;
}
