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;
const int maxn = 1e5 + 5;
const int INF = 1e9 + 19;
const int logn = 17;
int n, m;
int a[maxn];
bool isSpec[maxn];
vector<pair<int, int> > g[maxn];
int depth[maxn], len[maxn];
int p[maxn][logn];
int in[maxn], out[maxn];
int arr[maxn];
int Time = 0;
int f[maxn];
void ReadInput() {
  cin >> n >> m;
  fill(begin(isSpec), end(isSpec), false);
  for (int i = 1; i <= m; ++i) {
    int x;
    cin >> x;
    isSpec[x] = true;
  }
  for (int i = 1; i < n; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    g[u].push_back(pair<int, int>(v, w));
    g[v].push_back(pair<int, int>(u, w));
  }
}
void dfs1(int u, int par) {
  in[u] = ++Time;
  arr[Time] = u;
  p[u][0] = par;
  for (int k = 1; k < logn; ++k) p[u][k] = p[p[u][k - 1]][k - 1];
  for (auto to : g[u]) {
    int v = to.first;
    int w = to.second;
    if (v != par) {
      depth[v] = depth[u] + 1;
      len[v] = len[u] + w;
      dfs1(v, u);
    }
  }
  out[u] = Time;
}
int LCA(int u, int v) {
  if (depth[u] < depth[v]) swap(u, v);
  for (int k = logn - 1; k >= 0; --k)
    if (depth[p[u][k]] >= depth[v]) u = p[u][k];
  if (u == v) return u;
  for (int k = logn - 1; k >= 0; --k)
    if (p[u][k] != p[v][k]) {
      u = p[u][k];
      v = p[v][k];
    }
  return p[u][0];
}
struct TNode {
  int val;
  int cnt, child;
  inline TNode operator+(const TNode& other) {
    if (val < other.val) return other;
    if (val > other.val) return *this;
    return {val, cnt + other.cnt, child};
  }
} nodes[maxn * 4];
int lazy[maxn * 4];
void Build(int x, int l, int r) {
  if (l == r) {
    nodes[x] =
        (isSpec[arr[l]]) ? TNode{len[arr[l]], 1, arr[l]} : TNode{-INF, 0, 0};
    return;
  }
  int mid = (l + r) / 2;
  Build(x * 2, l, mid);
  Build(x * 2 + 1, mid + 1, r);
  nodes[x] = nodes[x * 2] + nodes[x * 2 + 1];
}
inline void push(int x) {
  int t = lazy[x];
  if (t == 0) return;
  lazy[x * 2] += t;
  nodes[x * 2].val += t;
  lazy[x * 2 + 1] += t;
  nodes[x * 2 + 1].val += t;
  lazy[x] = 0;
}
TNode Get(int x, int l, int r, int L, int R) {
  if (l >= L && r <= R) return nodes[x];
  push(x);
  int mid = (l + r) / 2;
  if (R <= mid) return Get(x * 2, l, mid, L, R);
  if (L > mid) return Get(x * 2 + 1, mid + 1, r, L, R);
  return Get(x * 2, l, mid, L, mid) + Get(x * 2 + 1, mid + 1, r, mid + 1, R);
}
void Update(int x, int l, int r, int L, int R, int k) {
  if (L > r || l > R) return;
  if (l >= L && r <= R) {
    nodes[x].val += k;
    lazy[x] += k;
    return;
  }
  push(x);
  int mid = (l + r) / 2;
  if (mid >= R)
    Update(x * 2, l, mid, L, R, k);
  else if (mid < L)
    Update(x * 2 + 1, mid + 1, r, L, R, k);
  else {
    Update(x * 2, l, mid, L, mid, k);
    Update(x * 2 + 1, mid + 1, r, mid + 1, R, k);
  }
  nodes[x] = nodes[x * 2] + nodes[x * 2 + 1];
}
inline void Inc(int u, int v) {
  int x = LCA(u, v);
  ++f[u];
  ++f[v];
  --f[x];
  --f[p[x][0]];
}
void calc(int u) {
  TNode temp = Get(1, 1, n, 1, n);
  int x = u;
  for (int k = logn - 1; k >= 0; --k) {
    if (p[x][k] == 0) continue;
    if (Get(1, 1, n, in[p[x][k]], out[p[x][k]]).val < temp.val) x = p[x][k];
  }
  if (Get(1, 1, n, in[x], out[x]).val < temp.val) x = p[x][0];
  int y = Get(1, 1, n, in[x], out[x]).child;
  for (int k = logn - 1; k >= 0; --k) {
    if (depth[p[y][k]] <= depth[x]) continue;
    if (Get(1, 1, n, in[p[y][k]], out[p[y][k]]).cnt < temp.cnt) y = p[y][k];
  }
  if (Get(1, 1, n, in[y], out[y]).cnt < temp.cnt) y = p[y][0];
  Inc(u, y);
}
void dfs2(int u, int par) {
  if (isSpec[u]) calc(u);
  for (auto to : g[u]) {
    int v = to.first;
    int w = to.second;
    if (v == par) continue;
    Update(1, 1, n, 1, n, w);
    Update(1, 1, n, in[v], out[v], -w * 2);
    dfs2(v, u);
    Update(1, 1, n, in[v], out[v], w * 2);
    Update(1, 1, n, 1, n, -w);
  }
}
void dfs3(int u, int par) {
  for (auto to : g[u]) {
    int v = to.first;
    if (v == par) continue;
    dfs3(v, u);
    f[u] += f[v];
  }
}
void Solve() {
  depth[1] = 1;
  len[1] = 0;
  dfs1(1, 0);
  fill(begin(lazy), end(lazy), 0);
  Build(1, 1, n);
  dfs2(1, 0);
  dfs3(1, 0);
  int mx = 0, cnt = 0;
  for (int i = 1; i <= n; ++i) {
    if (isSpec[i]) continue;
    if (mx < f[i]) {
      mx = f[i];
      cnt = 1;
    } else if (mx == f[i])
      ++cnt;
  }
  cout << mx << ' ' << cnt << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ReadInput();
  Solve();
}
