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;
namespace TYC {
const int N = 1e5 + 5;
int real, n, m, rot, len, ansv, ansc, Pos[N], Dis[N], Fa[N], Vis[N], Cnt[N],
    Size[N], id[N];
struct edge {
  int v, w;
};
vector<edge> E[N];
bool operator==(const edge &a, const edge &b) {
  return a.v == b.v && a.w == b.w;
}
inline int read() {
  int x = 0, f = 0, ch = getchar();
  while (!isdigit(ch)) f |= (ch == '-'), ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? -x : x;
}
void dfs1(const int u, const int f) {
  Fa[u] = f;
  for (auto p : E[u])
    if (p.v != f) {
      Dis[p.v] = Dis[u] + p.w;
      dfs1(p.v, u);
    }
}
void init() {
  int st = 0, ed = 0;
  dfs1(1, 0);
  for (int i = 1; i <= n; i++)
    if (Dis[i] > Dis[st]) st = i;
  Dis[st] = 0;
  dfs1(st, 0);
  for (int i = 1; i <= n; i++)
    if (Dis[i] > Dis[ed]) ed = i;
  len = Dis[ed] >> 1;
  for (int u = ed; u != st; u = Fa[u])
    if (Dis[u] >= len && Dis[Fa[u]] < len) {
      if (Dis[u] == len)
        rot = u;
      else {
        rot = ++n;
        int v = Fa[u];
        E[rot].push_back({u, Dis[u] - len});
        E[rot].push_back({v, len - Dis[v]});
        E[u].erase(find(E[u].begin(), E[u].end(), (edge){v, Dis[u] - Dis[v]}));
        E[v].erase(find(E[v].begin(), E[v].end(), (edge){u, Dis[u] - Dis[v]}));
      }
      break;
    }
}
void getnum(const int u, const int f) {
  Size[u] = Vis[u];
  if (Dis[u] == len) return void(Cnt[u] = 1);
  for (auto p : E[u])
    if (p.v != f) {
      getnum(p.v, u);
      Cnt[u] += Cnt[p.v];
      Size[u] += Size[p.v];
    }
}
void getans(const int u, const int f, const int tot, const int res) {
  if (!Vis[u]) {
    int v = Size[u] + (tot == Cnt[u]) * res;
    if (ansv < v)
      ansv = v, ansc = 1;
    else if (ansv == v)
      ansc++;
  }
  for (auto p : E[u])
    if (p.v != f) getans(p.v, u, tot, res);
}
void work() {
  real = n = read(), m = read();
  for (int i = 1; i <= m; i++) Vis[read()] = 1;
  for (int i = 1; i < n; i++) {
    int u = read(), v = read(), w = read();
    E[u].push_back({v, w << 1});
    E[v].push_back({u, w << 1});
  }
  init();
  dfs1(rot, 0);
  getnum(rot, 0);
  int num = 0;
  for (auto p : E[rot])
    if (Cnt[p.v]) id[num++] = p.v;
  if (num != 2) {
    if (rot <= real && !Vis[rot])
      printf("%d %d\n", m, 1);
    else
      printf("%d %d\n", 0, 0);
  } else {
    for (int i = 0; i < 2; i++) getans(id[i], 0, Cnt[id[i]], Size[id[i ^ 1]]);
    printf("%d %d\n", ansv, ansc);
  }
}
}  // namespace TYC
int main() {
  TYC::work();
  return 0;
}
