7 3
1 4 7
1 2 2
2 3 3
3 4 8
2 5 1
1 6 4
6 7 5
 10 2
1 5
5 3 2
8 4 8
7 6 9
7 10 1
10 1 4
9 5 1
5 8 2
7 2 9
6 5 6
 10 5
4 8 7 5 1
5 1 1
2 7 1
4 3 1
10 9 1
10 1 1
1 8 1
10 7 1
10 3 1
7 6 1
 10 9
9 7 6 10 3 5 2 8 1
9 4 10
10 8 3
3 6 2
5 1 8
5 2 5
1 10 10
6 7 1
9 1 7
1 6 3
 10 5
8 5 2 10 1
3 1 7
5 4 6
10 8 4
6 8 9
7 8 4
9 5 6
8 1 9
2 10 2
9 8 7

3 2
 2 3
 5 1
 0 1
 5 1

#include <bits/stdc++.h>
using namespace std;
int hmt() {
  int x = 0;
  int c = getchar(), n = 0;
  for (; !isdigit(c); c = getchar()) n = (c == '-');
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  if (n) x = -x;
  return x;
}
const int N = 100010;
int n, m, mem[4 * N], d[N], a[N], f[N][20], tin[N], tout[N], id, lg, t[N], v[N],
    ans, res;
pair<int, int> ti[4 * N], to[4 * N];
vector<pair<int, int> > ke[N];
void dfs(int u, int p) {
  tin[u] = ++id;
  v[id] = u;
  for (int i = 1, _b = lg; i <= _b; ++i) f[u][i] = f[f[u][i - 1]][i - 1];
  for (auto &v : ke[u])
    if (v.first != p) {
      f[v.first][0] = u;
      d[v.first] = d[u] + v.second;
      dfs(v.first, u);
    }
  tout[u] = id;
}
bool cheq(int u, int v) { return (tin[u] <= tin[v] && tout[u] >= tout[v]); }
int LCA(int u, int v) {
  if (cheq(u, v)) return u;
  if (cheq(v, u)) return v;
  for (int i = lg; i >= 0; --i)
    if (!cheq(f[u][i], v) && f[u][i] != 0) u = f[u][i];
  return f[u][0];
}
pair<int, int> maxi(pair<int, int> x, pair<int, int> y) {
  if (x.first != y.first) return (x.first > y.first) ? x : y;
  return (tin[x.second] > tin[y.second]) ? x : y;
}
pair<int, int> maxo(pair<int, int> x, pair<int, int> y) {
  if (x.first != y.first) return (x.first > y.first) ? x : y;
  return (tout[x.second] < tout[y.second]) ? x : y;
}
void build(int s, int l, int r) {
  if (l == r) {
    ti[s].second = to[s].second = v[l];
    ti[s].first = to[s].first = (!a[v[l]]) ? -1e9 : d[v[l]];
    return;
  }
  int mid = (l + r) / 2;
  build(2 * s, l, mid);
  build(2 * s + 1, mid + 1, r);
  ti[s] = maxi(ti[2 * s], ti[2 * s + 1]);
  to[s] = maxo(to[2 * s], to[2 * s + 1]);
}
void tran(int s) {
  if (!mem[s]) return;
  int x = mem[s];
  mem[s] = 0;
  ti[2 * s].first += x;
  ti[2 * s + 1].first += x;
  to[2 * s].first += x;
  to[2 * s + 1].first += x;
  mem[2 * s] += x;
  mem[2 * s + 1] += x;
}
void update(int s, int l, int r, int u, int v, int x) {
  if (l > v || r < u) return;
  if (l >= u && r <= v) {
    ti[s].first += x;
    to[s].first += x;
    mem[s] += x;
    return;
  }
  int mid = (l + r) / 2;
  tran(s);
  update(2 * s, l, mid, u, v, x);
  update(2 * s + 1, mid + 1, r, u, v, x);
  ti[s] = maxi(ti[2 * s], ti[2 * s + 1]);
  to[s] = maxo(to[2 * s], to[2 * s + 1]);
}
int get(int s, int l, int r, int u, int v) {
  if (l > v || r < u) return -1e9;
  if (l >= u && r <= v) return ti[s].first;
  int mid = (l + r) / 2;
  tran(s);
  return max(get(2 * s, l, mid, u, v), get(2 * s + 1, mid + 1, r, u, v));
}
void DFS(int u, int p) {
  for (auto &v : ke[u])
    if (v.first != p) {
      update(1, 1, n, 1, n, v.second);
      update(1, 1, n, tin[v.first], tout[v.first], -2 * v.second);
      if (a[v.first]) {
        pair<int, int> x = ti[1], y = to[1];
        if (x.first >= 0) {
          int z = LCA(x.second, y.second);
          if (cheq(v.first, z))
            t[z]++, t[u]--;
          else if (cheq(z, v.first)) {
            if (get(1, 1, n, tin[v.first], tout[v.first]) < x.first) {
              t[v.first]++;
              int p = v.first;
              for (int i = lg; i >= 0; --i) {
                int j = f[p][i];
                if (j && get(1, 1, n, tin[j], tout[j]) < x.first) p = i;
              }
              t[f[p][1]]--;
            }
          } else {
            int p = LCA(v.first, z);
            t[v.first]++;
            t[z]++;
            t[p]--;
            t[f[p][0]]--;
          }
        }
      }
      DFS(v.first, u);
      update(1, 1, n, 1, n, -v.second);
      update(1, 1, n, tin[v.first], tout[v.first], 2 * v.second);
    }
}
void Dfs(int u, int p) {
  for (auto &v : ke[u])
    if (v.first != p) {
      Dfs(v.first, u);
      t[u] += t[v.first];
    }
  if (a[u]) return;
  if (t[u] > ans) ans = t[u], res = 0;
  if (t[u] == ans) ++res;
}
int main() {
  n = hmt(), m = hmt();
  lg = log2(n);
  while (m--) a[hmt()] = 1;
  for (int i = 1, _b = n - 1; i <= _b; ++i) {
    int u = hmt(), v = hmt(), c = hmt();
    ke[u].push_back({v, c});
    ke[v].push_back({u, c});
  }
  dfs(1, 0);
  build(1, 1, n);
  if (a[1]) {
    pair<int, int> x = ti[1], y = to[1];
    if (x.first >= 0) {
      int z = LCA(x.second, y.second);
      t[z]++;
    }
  }
  DFS(1, 0);
  Dfs(1, 0);
  cout << ans << " " << res << "\n";
}
