#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long linf = 1e18;
const int inf = 1e9;
const int N = 4e5 + 5;
const int logN = 18;
int T, r[N], num[N], start[N], finish[N], LOG[N], ww[N], h[N], s, sum[N],
    ans[N], dp[N], p[N], rmq[N][logN + 1], x, y, z, n, m, depth[N];
pair<int, pair<int, int> > temp[N];
vector<pair<int, int> > v[N], g[N], t;
pair<int, int> P[N], PP[N];
int LCA(int x, int y) {
  x = start[x], y = start[y];
  if (x > y) swap(x, y);
  int t = LOG[y - x + 1];
  return ww[min(rmq[x][t], rmq[y - (1 << t) + 1][t])];
}
void dfs(int node, int root, int d) {
  t.push_back(make_pair(d, node));
  r[node] = root;
  depth[node] = depth[root] + 1;
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (it->first != root) dfs(it->first, node, d + 1);
}
void pre(int node, int root) {
  t.push_back(make_pair(node, num[node]));
  start[node] = ++T;
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (it->first != root) {
      pre(it->first, node);
      t.push_back(make_pair(node, num[node]));
      start[node] = ++T;
    }
}
int prepare(int node, int root) {
  sum[node] = 1;
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (it->first != root && !h[it->first])
      sum[node] += prepare(it->first, node);
  return sum[node];
}
int find(int node, int root, int sum) {
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (it->first != root && !h[it->first] && ::sum[it->first] > sum)
      return find(it->first, node, sum);
  return node;
}
void calc(int node, int root, int depth) {
  P[node] = make_pair(node, -inf);
  if (p[node]) P[node].second = 0;
  g[s].push_back(make_pair(node, depth));
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (!h[it->first] && it->first != root) {
      calc(it->first, node, depth + it->second);
      pair<int, int> temp = P[it->first];
      temp.second += it->second;
      if (P[node].second < temp.second)
        P[node] = temp;
      else if (P[node].second == temp.second)
        P[node].first = node;
    }
}
pair<int, int> merge(int x, int y, int a, int b) {
  if (!x && !y) return make_pair(a, b);
  if (!a && !b) return make_pair(x, y);
  int l1 = LCA(x, y), l2 = LCA(a, b);
  int l3 = LCA(l1, l2), nl = 0;
  if (l3 == l1)
    nl = l2;
  else if (l3 == l2)
    nl = l1;
  else
    return make_pair(0, 0);
  int t1 = LCA(x, a), t2 = LCA(x, b), t3 = LCA(y, a), t4 = LCA(y, b);
  int start = nl, finish = nl, h[5] = {0};
  if (depth[t1] > depth[start] && LCA(start, t1) == start) {
    start = t1;
    h[1] = 1;
  }
  if (depth[t2] > depth[start] && LCA(start, t2) == start) {
    start = t2;
    h[2] = 1;
  }
  if (depth[t3] > depth[start] && LCA(start, t3) == start) {
    start = t3;
    h[3] = 1;
  }
  if (depth[t4] > depth[start] && LCA(start, t4) == start) {
    start = t4;
    h[4] = 1;
  }
  if (!h[1] && depth[t1] > depth[finish] && LCA(finish, t1) == finish)
    finish = t1;
  if (!h[2] && depth[t2] > depth[finish] && LCA(finish, t2) == finish)
    finish = t2;
  if (!h[3] && depth[t3] > depth[finish] && LCA(finish, t3) == finish)
    finish = t3;
  if (!h[4] && depth[t4] > depth[finish] && LCA(finish, t4) == finish)
    finish = t4;
  return make_pair(start, finish);
}
void solve(int x) {
  prepare(x, 0);
  int node = find(x, 0, sum[x] / 2);
  g[1].clear();
  h[node] = true;
  s = 1;
  g[1].push_back(make_pair(node, 0));
  if (p[node])
    PP[1] = make_pair(node, 0);
  else
    PP[1] = make_pair(node, -inf);
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (!h[it->first]) {
      g[++s].clear();
      calc(it->first, node, it->second);
      PP[s] = P[it->first];
      PP[s].second += it->second;
    }
  int mx = 0, group = 1, wh = node;
  if (!p[node]) mx = -inf;
  for (int i = 1; i <= s; i++) {
    if (group)
      for (__typeof(g[i].begin()) it = g[i].begin(); it != g[i].end(); it++) {
        if (temp[it->first].first == mx + it->second)
          temp[it->first].second =
              merge(temp[it->first].second.first, temp[it->first].second.second,
                    it->first, wh);
        else if (temp[it->first].first < mx + it->second)
          temp[it->first] =
              make_pair(mx + it->second, make_pair(it->first, wh));
      }
    if (PP[i].second == mx) {
      group = 1;
      wh = node;
    } else if (PP[i].second > mx) {
      mx = PP[i].second;
      wh = PP[i].first;
    }
  }
  mx = 0;
  group = 1, wh = node;
  if (!p[node]) mx = -inf;
  for (int i = s; i >= 1; i--) {
    if (group)
      for (__typeof(g[i].begin()) it = g[i].begin(); it != g[i].end(); it++) {
        if (temp[it->first].first == mx + it->second)
          temp[it->first].second =
              merge(temp[it->first].second.first, temp[it->first].second.second,
                    it->first, wh);
        else if (temp[it->first].first < mx + it->second)
          temp[it->first] =
              make_pair(mx + it->second, make_pair(it->first, wh));
      }
    if (PP[i].second == mx) {
      group = 1;
      wh = node;
    } else if (PP[i].second > mx) {
      mx = PP[i].second;
      wh = PP[i].first;
    }
  }
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (h[it->first] == false) solve(it->first);
}
int dfs2(int node, int root) {
  for (__typeof(v[node].begin()) it = v[node].begin(); it != v[node].end();
       it++)
    if (root != it->first) dp[node] += dfs2(it->first, node);
  return dp[node];
}
int main() {
  for (int i = 1; i <= N - 1; i++) LOG[i] = log2(i);
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &x);
    p[x] = 1;
  }
  for (int i = 2; i <= n; i++) {
    scanf("%d %d %d", &x, &y, &z);
    v[x].push_back(make_pair(y, z));
    v[y].push_back(make_pair(x, z));
  }
  int a, b;
  dfs(1, 0, 0);
  sort(t.begin(), t.end());
  int nn = 0;
  for (__typeof(t.begin()) it = t.begin(); it != t.end(); it++) {
    num[it->second] = ++nn;
    ww[nn] = it->second;
  }
  t.clear();
  pre(1, 0);
  for (int i = 1; i <= t.size(); i++) rmq[i][0] = t[i - 1].second;
  for (int j = 1; j <= logN; j++)
    for (int i = 1; i <= t.size(); i++)
      rmq[i][j] =
          min(rmq[i][j - 1], rmq[min((int)t.size(), i + (1 << j - 1))][j - 1]);
  int mx = 0, cnt = 0;
  solve(1);
  for (int i = 1; i <= n; i++)
    if (p[i] == true) {
      dp[temp[i].second.first]++;
      dp[temp[i].second.second]++;
      int t = LCA(temp[i].second.first, temp[i].second.second);
      dp[t]--;
      dp[r[t]]--;
    }
  dfs2(1, 0);
  mx = -1;
  for (int i = 1; i <= n; i++)
    if (p[i] == false && dp[i] == mx)
      cnt++;
    else if (p[i] == false && mx < dp[i]) {
      mx = dp[i];
      cnt = 1;
    }
  printf("%d %d\n", mx, cnt);
  return 0;
}
