#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;
}
