#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const int N = 1e5 + 5;
struct Node {
  int d;
  int l, r;
  Node(int d = 0, int l = 0, int r = 0) : d(d), l(l), r(r) {}
} tr[N << 1];
int lz[N << 1];
Node operator+(const Node& a, const Node& b) {
  Node c;
  c.d = max(a.d, b.d);
  c.l = (a.d == c.d ? a.l : b.l);
  c.r = (b.d == c.d ? b.r : a.r);
  return c;
}
vector<pair<int, int> > g[N];
int p[N][20];
int st[N], en[N];
int tot = 0;
int n, m;
int f[N];
bool special[N];
void dfs(int u, int d) {
  for (int i = 0; i < 16; ++i) p[u][i + 1] = p[p[u][i]][i];
  tr[n + tot] = special[u] ? Node(d, u, u) : Node(-1e9, 0, 0);
  st[u] = ++tot;
  for (pair<int, int> e : g[u])
    if (e.first != p[u][0]) {
      int v = e.first;
      int w = e.second;
      p[v][0] = u;
      dfs(v, d + w);
    }
  en[u] = tot;
}
bool is_anc(int u, int v) {
  if (u == 0)
    return 1;
  else
    return st[u] <= st[v] && en[v] <= en[u];
}
int lca(int u, int v) {
  if (is_anc(u, v)) return u;
  for (int i = 16; i >= 0; --i)
    if (!is_anc(p[u][i], v)) u = p[u][i];
  return p[u][0];
}
void app(int i, int v) {
  tr[i].d += v;
  lz[i] += v;
}
void upd(int l, int r, int x) {
  l += n - 1;
  r += n;
  int L = l / 2, R = (r - 1) / 2;
  for (; l < r; l >>= 1, r >>= 1) {
    if (l & 1) app(l++, x);
    if (r & 1) app(--r, x);
  }
  for (; L > 0; L >>= 1) {
    tr[L] = tr[L << 1] + tr[L << 1 | 1];
    tr[L].d += lz[L];
  }
  for (; R > 0; R >>= 1) {
    tr[R] = tr[R << 1] + tr[R << 1 | 1];
    tr[R].d += lz[R];
  }
}
void cal1(int u) {
  if (special[u]) {
    int x = tr[1].l;
    int y = tr[1].r;
    int a = lca(x, u);
    int b = lca(y, u);
    int c = lca(x, y);
    if (a == b) a = b = c;
    if (a == c) a = c = b;
    f[u]++;
    f[a]++;
    a = lca(a, u);
    f[a]--;
    a = p[a][0];
    f[a]--;
  }
  for (pair<int, int> e : g[u])
    if (e.first != p[u][0]) {
      int v = e.first;
      int w = e.second;
      upd(st[v], en[v], -w - w);
      upd(st[1], en[1], w);
      cal1(v);
      upd(st[v], en[v], w + w);
      upd(st[1], en[1], -w);
    }
}
void cal2(int u) {
  for (pair<int, int> e : g[u])
    if (e.first != p[u][0]) {
      cal2(e.first);
      f[u] += f[e.first];
    }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    special[x] = 1;
  }
  for (int i = 1; i < n; ++i) {
    int u;
    cin >> u;
    int v;
    cin >> v;
    int w;
    cin >> w;
    g[u].emplace_back(v, w);
    g[v].emplace_back(u, w);
  }
  dfs(1, 0);
  for (int i = n - 1; i; --i) tr[i] = tr[i << 1] + tr[i << 1 | 1];
  cal1(1);
  cal2(1);
  int ans = 0;
  int cnt = 0;
  for (int i = 1; i <= n; ++i)
    if (!special[i]) {
      if (ans < f[i]) {
        ans = f[i];
        cnt = 0;
      }
      if (ans == f[i]) cnt++;
    }
  cout << ans << " ";
  cout << cnt << "\n";
}
