#include <bits/stdc++.h>
using namespace std;
void run();
int main() {
  ios::sync_with_stdio(0);
  run();
}
long long const lots = ((1ll << 62ll) - 1ll) ^ (1ll << 31ll);
set<pair<long long, long long>> edge[112300];
long long depth[112300];
long long anc[112300][22];
long long ans[112300];
long long add[112300];
pair<long long, long long> dn[112300];
pair<long long, long long> up[112300];
bool used[112300];
void prep(int x) {
  if (used[x])
    dn[x] = up[x] = {0, x};
  else
    dn[x] = up[x] = {-lots, x};
  for (int i = 0; i < 21; i++) {
    anc[x][i + 1] = anc[anc[x][i]][i];
  }
  for (auto y : edge[x]) {
    edge[y.first].erase({x, y.second});
    depth[y.first] = depth[x] + 1;
    anc[y.first][0] = x;
    prep(y.first);
    if (dn[y.first].first < 0) continue;
    if (dn[y.first].first + y.second == dn[x].first) {
      dn[x].second = x;
      continue;
    }
    if (dn[y.first].first + y.second >= dn[x].first) {
      dn[x] = {dn[y.first].first + y.second, dn[y.first].second};
    }
  }
}
void calc(int x) {
  vector<pair<long long, long long>> all;
  for (auto y : edge[x]) {
    if (dn[y.first].first >= 0)
      all.push_back({dn[y.first].first + y.second, dn[y.first].second});
    else
      all.push_back(dn[y.first]);
  }
  if (up[x].first >= 0) {
    all.push_back(up[x]);
  }
  sort(all.begin(), all.end());
  for (auto y : edge[x]) {
    pair<long long, long long> &r = up[y.first];
    for (int q = 5, i = all.size();
         q-- and i-- and all[i].first + y.second >= r.first;) {
      if (all[i].second == dn[y.first].second) continue;
      if (all[i].first + y.second == r.first) {
        r.second = x;
        break;
      }
      r = {all[i].first + y.second, all[i].second};
    }
    calc(y.first);
  }
}
int lca(int a, int b) {
  if (depth[a] < depth[b]) swap(a, b);
  for (int i = 22; i--;)
    if ((depth[a] - depth[b]) & (1 << i)) a = anc[a][i];
  for (int i = 22; i--;)
    if (anc[a][i] != anc[b][i]) a = anc[a][i], b = anc[b][i];
  while (a != b) a = anc[a][0], b = anc[b][0];
  return a;
}
void solve(int x) {
  for (auto y : edge[x]) {
    solve(y.first);
    add[x] += add[y.first];
  }
  ans[x] += add[x];
}
void run() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    --x;
    used[x] = true;
  }
  for (int i = 1; i < n; i++) {
    long long a, b, c;
    cin >> a >> b >> c;
    --a, --b;
    edge[a].insert({b, c});
    edge[b].insert({a, c});
  }
  prep(0);
  calc(0);
  for (int i = 0; i < n; i++) {
    if (not used[i]) continue;
    int a = i;
    int b = a;
    if (up[a].first == dn[a].first) continue;
    if (up[a].first > dn[a].first and up[a].first >= 0) b = up[a].second;
    if (dn[a].first > up[a].first and dn[a].first >= 0) b = dn[a].second;
    int l = lca(a, b);
    add[a] += 1;
    add[b] += 1;
    add[l] -= 2;
    ans[l] += 1;
  }
  solve(0);
  pair<long long, long long> res = {0, 0};
  for (int i = n; i--;) {
    if (used[i]) continue;
    if (ans[i] == res.first) {
      ++res.second;
    } else if (ans[i] > res.first) {
      res = {ans[i], 1};
    }
  }
  cout << res.first << " " << res.second << endl;
}
