#include <bits/stdc++.h>
using namespace std;
const int max_n = 100111, max_log = 20, inf = 1e9 + 100;
vector<pair<int, int> > v[max_n];
vector<pair<int, int> > to_add;
int n, m;
bool is_p[max_n];
pair<int, int> dp[max_n];
int cnt_off[max_n];
void dfs(int cur, int pr) {
  if (v[cur].size() == 1) {
    if (is_p[cur]) {
      dp[cur] = {0, cur};
    } else {
      dp[cur] = {-inf, cur};
    }
    return;
  }
  vector<pair<int, int> > ch;
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    int elen = v[cur][i].second;
    if (to == pr) {
      continue;
    }
    dfs(to, cur);
    ch.emplace_back(dp[to].first + elen, dp[to].second);
  }
  sort(ch.begin(), ch.end());
  reverse(ch.begin(), ch.end());
  if (ch.size() == 1) {
    dp[cur] = ch[0];
  } else {
    if (ch[0].first == ch[1].first) {
      dp[cur] = {ch[0].first, cur};
    } else {
      dp[cur] = ch[0];
    }
  }
  if (dp[cur].first < 0 && is_p[cur]) {
    dp[cur] = {0, cur};
  }
}
void dfs_back(int cur, int pr, pair<int, int> top) {
  multiset<pair<int, int> > ch;
  if (pr != -1) {
    ch.insert(top);
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    int elen = v[cur][i].second;
    if (to == pr) {
      continue;
    }
    ch.emplace(dp[to].first + elen, dp[to].second);
  }
  if (is_p[cur]) {
    if (ch.size() == 1) {
      to_add.emplace_back(cur, ch.rbegin()->second);
    } else {
      auto it = ch.rbegin();
      pair<int, int> f = *it;
      ++it;
      pair<int, int> s = *it;
      if (f.first > s.first) {
        to_add.emplace_back(cur, f.second);
      }
    }
  }
  if (v[cur].size() == 1) {
    return;
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    int elen = v[cur][i].second;
    if (to == pr) {
      continue;
    }
    pair<int, int> ch_val = {dp[to].first + elen, dp[to].second};
    ch.erase(ch.find(ch_val));
    if (ch.size() == 1) {
      dfs_back(to, cur, {ch.begin()->first + elen, ch.begin()->second});
    } else {
      auto it = ch.rbegin();
      pair<int, int> f = *it;
      ++it;
      pair<int, int> s = *it;
      if (f.first > s.first) {
        dfs_back(to, cur, {f.first + elen, f.second});
      } else {
        dfs_back(to, cur, {f.first + elen, cur});
      }
    }
    ch.insert(ch_val);
  }
}
int tin[max_n];
int tout[max_n];
int cur_time = 0;
int pr[max_n][max_log];
void dfs_lca(int cur, int p) {
  tin[cur] = cur_time++;
  pr[cur][0] = p;
  for (int l = 0; l < max_log; ++l) {
    if (pr[cur][l] != -1 && pr[pr[cur][l]][l] != -1) {
      pr[cur][l + 1] = pr[pr[cur][l]][l];
    } else {
      break;
    }
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    if (to != p) {
      dfs_lca(to, cur);
    }
  }
  tout[cur] = cur_time++;
}
bool is_anc(int a, int b) {
  if (a == -1) {
    return true;
  }
  return tin[a] <= tin[b] && tout[a] >= tout[b];
}
int lca(int a, int b) {
  if (is_anc(a, b)) {
    return a;
  }
  if (is_anc(b, a)) {
    return b;
  }
  for (int l = max_log; l > 0; --l) {
    if (!is_anc(pr[a][l - 1], b)) {
      a = pr[a][l - 1];
    }
  }
  return pr[a][0];
}
struct segment_tree {
  int tr[max_n * 4];
  void add(int cur, int l, int r, int ql, int qr, int val) {
    if (l == ql && r == qr) {
      tr[cur] += val;
      return;
    }
    if (l > qr || r < ql) {
      return;
    }
    int mid = (l + r) / 2;
    add(cur * 2, l, mid, ql, min(qr, mid), val);
    add(cur * 2 + 1, mid + 1, r, max(ql, mid + 1), qr, val);
  }
  int get(int cur, int l, int r, int pos) {
    if (l == r) {
      return tr[cur];
    }
    int mid = (l + r) / 2;
    if (pos <= mid) {
      return get(cur * 2, l, mid, pos) + tr[cur];
    } else {
      return get(cur * 2 + 1, mid + 1, r, pos) + tr[cur];
    }
  }
} st;
int sz[max_n];
int start[max_n];
int pos[max_n];
int cur_pos = 0;
int add_lca[max_n];
void dfs_size(int cur, int pr) {
  sz[cur] = 1;
  for (auto& to : v[cur]) {
    if (to.first == pr) continue;
    dfs_size(to.first, cur);
    sz[cur] += sz[to.first];
    if (v[cur][0].first == pr || sz[v[cur][0].first] < sz[to.first]) {
      swap(v[cur][0], to);
    }
  }
}
void dfs_hld(int cur, int pr, int st) {
  pos[cur] = cur_pos++;
  start[cur] = st;
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    if (to == pr) continue;
    if (i == 0) {
      dfs_hld(to, cur, st);
    } else {
      dfs_hld(to, cur, to);
    }
  }
}
void add(int cur, int root, int val) {
  while (start[root] != start[cur]) {
    st.add(1, 0, max_n - 1, pos[start[cur]], pos[cur], val);
    cur = pr[start[cur]][0];
  }
  st.add(1, 0, max_n - 1, pos[root], pos[cur], val);
}
int get(int cur) { return st.get(1, 0, max_n - 1, pos[cur]); }
bool dfs_dumb(int cur, int pr, int fin) {
  if (cur == fin) {
    cnt_off[cur]++;
    return true;
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    if (to == pr) {
      continue;
    }
    if (dfs_dumb(to, cur, fin)) {
      cnt_off[cur]++;
      return true;
    }
  }
  return false;
}
int main() {
  for (int i = 0; i < max_n; ++i) {
    for (int j = 0; j < max_log; ++j) {
      pr[i][j] = -1;
    }
  }
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int a;
    scanf("%d", &a);
    --a;
    is_p[a] = 1;
  }
  for (int i = 0; i + 1 < n; ++i) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    --a, --b;
    v[a].emplace_back(b, c);
    v[b].emplace_back(a, c);
  }
  int root;
  for (int i = 0; i < n; ++i) {
    if (v[i].size() > 1) {
      root = i;
      break;
    }
  }
  dfs(root, -1);
  dfs_back(root, -1, {-1, -1});
  dfs_lca(root, -1);
  dfs_size(root, -1);
  dfs_hld(root, -1, root);
  for (auto path : to_add) {
    int from = path.first, to = path.second;
    int lc = lca(from, to);
    add(from, lc, 1);
    add(to, lc, 1);
    add_lca[lc]--;
  }
  int mx = -1, cntmx = 0;
  for (int i = 0; i < n; ++i) {
    cnt_off[i] = get(i) + add_lca[i];
    if (is_p[i]) {
      continue;
    }
    if (cnt_off[i] > mx) {
      mx = cnt_off[i];
      cntmx = 1;
    } else if (cnt_off[i] == mx) {
      ++cntmx;
    }
  }
  cout << mx << ' ' << cntmx << endl;
  return 0;
}
