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;
struct Edge {
  int to, next, v;
} edges[300005];
int first[100005] = {0}, te = 1, n, m;
bool is[100005] = {0};
int down[100005][4] = {0}, up[100005] = {0};
int lazy1[100005] = {0}, lazy2[100005] = {0}, num[100005] = {0};
void addE(int a, int b, int c) {
  edges[++te].to = b;
  edges[te].v = c;
  edges[te].next = first[a];
  first[a] = te;
}
void getdown(int x, int y) {
  for (int e = first[x]; e; e = edges[e].next) {
    int now = edges[e].to;
    if (now != y) getdown(now, x);
  }
  for (int e = first[x]; e; e = edges[e].next) {
    int now = edges[e].to;
    if (now != y) {
      if (is[now] || down[now][1]) {
        int tot = down[now][1] + edges[e].v;
        if (tot > down[x][3]) down[x][3] = tot;
        for (int j = 2; j >= 1; --j)
          if (down[x][j] < down[x][j + 1]) swap(down[x][j], down[x][j + 1]);
      }
    }
  }
}
void getup(int x, int y) {
  for (int e = first[x]; e; e = edges[e].next) {
    int now = edges[e].to;
    if (now == y) {
      if (down[y][1] == down[x][1] + edges[e].v)
        up[x] = max(up[y] + edges[e].v, edges[e].v + down[y][2]);
      else
        up[x] = max(up[y] + edges[e].v, edges[e].v + down[y][1]);
      break;
    }
  }
  for (int e = first[x]; e; e = edges[e].next) {
    int now = edges[e].to;
    if (now != y) getup(now, x);
  }
}
void update(int x, int y) {
  for (int e = first[x]; e; e = edges[e].next) {
    int now = edges[e].to;
    if (y != now) update(now, x);
  }
  if (is[x] && (up[x] > down[x][1])) lazy2[x]++;
  num[x] += lazy2[x];
  for (int e = first[x]; e; e = edges[e].next) {
    int now = edges[e].to;
    if (y == now) {
      int tot1 = up[y], tot2;
      if (down[y][1] == down[x][1] + edges[e].v)
        tot2 = down[y][2];
      else
        tot2 = down[y][1];
      if (tot1 > tot2)
        lazy2[y] += lazy2[x];
      else if (tot1 == tot2)
        return;
      else {
        if (down[y][1] == down[x][1] + edges[e].v)
          if (down[y][2] == down[y][3])
            return;
          else if (down[y][1] == down[y][2])
            return;
        num[y] += lazy2[x];
        for (int ee = first[y]; ee; ee = edges[ee].next) {
          int now2 = edges[ee].to;
          if (tot2 == down[now2][1] + edges[ee].v) {
            lazy1[now2] += lazy2[x];
            break;
          }
        }
      }
      break;
    }
  }
}
void downdate(int x, int y) {
  if (is[x] && down[x][1] > up[x]) lazy1[x]++;
  num[x] += lazy1[x];
  if (lazy1[x]) {
    for (int e = first[x]; e; e = edges[e].next) {
      int now = edges[e].to;
      if (edges[e].v + down[now][1] == down[x][1]) lazy1[now] += lazy1[x];
    }
  }
  for (int e = first[x]; e; e = edges[e].next) {
    int now = edges[e].to;
    if (now != y) downdate(now, x);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  int x, y, w;
  for (int i = 1; i <= m; ++i) cin >> x, is[x] = 1;
  for (int i = 1; i < n; ++i) {
    cin >> x >> y >> w;
    addE(x, y, w);
    addE(y, x, w);
  }
  getdown(1, -1);
  getup(1, -1);
  update(1, -1);
  downdate(1, -1);
  int ans1 = 0, ans2 = 0;
  for (int j = 1; j <= n; ++j)
    if (!is[j]) {
      if (num[j] == ans1)
        ans2++;
      else if (num[j] > ans1) {
        ans1 = num[j];
        ans2 = 1;
      }
    }
  cout << ans1 << " " << ans2;
  return 0;
}
