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 ecnt;
struct Edge {
  int to, w;
  Edge *next;
} * mat[100010], edges[100010 * 2];
void link(int x, int to, int w) {
  edges[ecnt] = (Edge){to, w, mat[x]};
  mat[x] = &edges[ecnt++];
}
int cnt[100010], n, m;
int dev[100010], fa[100010][20];
int val[100010];
struct Node {
  int L, node, from;
  Node(int L = 0, int node = 0, int from = 0) : L(L), node(node), from(from) {}
  friend bool operator<(const Node &a, const Node &b) { return a.L > b.L; }
} data[100010][4];
bool mark[100010];
Node dfsA(int x, int father) {
  if (mark[x]) {
    cnt[x] = 1;
    data[x][0] = Node(0, x, x);
  } else
    cnt[x] = 0;
  for (Edge *p = mat[x]; p; p = p->next) {
    int to = p->to;
    if (to == father) continue;
    dev[to] = dev[x] + 1;
    fa[to][0] = x;
    for (int i = 1; i < 20; i++) fa[to][i] = fa[fa[to][i - 1]][i - 1];
    Node tmp = dfsA(to, x);
    if (tmp.L < 0) continue;
    tmp.L += p->w;
    tmp.from = to;
    data[x][cnt[x]++] = tmp;
    sort(data[x], data[x] + cnt[x]);
    cnt[x] = min(cnt[x], 3);
  }
  if (cnt[x] == 0) return Node(-1, -1, -1);
  Node tmp;
  if (cnt[x] == 1 || data[x][0].L != data[x][1].L)
    tmp = data[x][0];
  else
    tmp = Node(data[x][0].L, x, x);
  tmp.from = x;
  return tmp;
}
Node getNode(int x, int to) {
  Node tmp(-1, -1, -1);
  for (int i = 0; i < cnt[x]; i++) {
    if (data[x][i].from == to) continue;
    if (tmp.L == -1)
      tmp = data[x][i];
    else if (tmp.L == data[x][i].L)
      tmp.node = x;
  }
  tmp.from = x;
  return tmp;
}
vector<pair<int, int> > e;
void dfsB(int x, int father, Node tmp) {
  if (tmp.L > 0) {
    data[x][cnt[x]++] = tmp;
    sort(data[x], data[x] + cnt[x]);
    cnt[x] = min(cnt[x], 3);
  }
  if (mark[x])
    if (cnt[x] == 1 || cnt[x] > 1 && data[x][0].L != data[x][1].L)
      e.push_back(make_pair(x, data[x][0].node));
  for (Edge *p = mat[x]; p; p = p->next) {
    int to = p->to;
    if (to == father) continue;
    Node tmp = getNode(x, to);
    if (tmp.L >= 0) tmp.L += p->w;
    dfsB(to, x, tmp);
  }
}
int lca(int u, int v) {
  if (dev[u] < dev[v]) swap(u, v);
  for (int i = 0, K = dev[u] - dev[v]; K; i++, K >>= 1) {
    if (K & 1) {
      u = fa[u][i];
    }
  }
  if (u == v) return u;
  for (int i = 19; i >= 0; i--) {
    if (fa[u][i] == fa[v][i]) continue;
    u = fa[u][i];
    v = fa[v][i];
  }
  return fa[u][0];
}
int dfs(int x, int father) {
  for (Edge *p = mat[x]; p; p = p->next) {
    int to = p->to;
    if (to == father) continue;
    val[x] += dfs(to, x);
  }
  return val[x];
}
inline bool in_R(int x) { return 1 <= x && x <= n; }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", &x);
    mark[x] = 1;
  }
  for (int i = 0; i < n - 1; i++) {
    int x, y, w;
    scanf("%d%d%d", &x, &y, &w);
    link(x, y, w);
    link(y, x, w);
  }
  dfsA(1, -1);
  dfsB(1, -1, Node(-1, -1, -1));
  for (int i = 0; i < e.size(); i++) {
    int k = lca(e[i].first, e[i].second);
    while (!in_R(e[i].first))
      ;
    while (!in_R(e[i].second))
      ;
    while (!in_R(k))
      ;
    val[fa[k][0]]--;
    val[k]--;
    val[e[i].first]++;
    val[e[i].second]++;
  }
  dfs(1, -1);
  int ans = -1, num = n - m;
  for (int i = 1; i <= n; i++) {
    if (mark[i]) continue;
    if (val[i] > ans) {
      ans = val[i];
      num = 0;
    }
    if (val[i] == ans) num++;
  }
  printf("%d %d\n", ans, num);
  return 0;
}
