#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> path;
bool special[100010];
vector<pair<int, int> > E[100010];
path up[100010];
path down[100010];
int depth[100010];
int par[100010][18];
int add[100010];
int cover[100010];
ostream& operator<<(ostream& out, const pair<int, int>& p) {
  return out << "(" << p.first << "," << p.second << ")";
}
path take_better(const path& a, const path& b, int i) {
  if (a.first > b.first) return a;
  if (a.first < b.first) return b;
  return make_pair(a.first, i);
}
void dfs1(int i, int p) {
  if (special[i])
    down[i] = make_pair(0, i);
  else
    down[i] = make_pair(-1000000000, i);
  par[i][0] = p;
  depth[i] = depth[p] + 1;
  int numE = E[i].size();
  for (int x = 0; x < (numE); ++x) {
    int j = E[i][x].first, c = E[i][x].second;
    if (j == p) continue;
    dfs1(j, i);
    path dd = down[j];
    dd.first += c;
    down[i] = take_better(down[i], dd, i);
  }
}
void dfs2(int i, int p, path withoutMe) {
  up[i] = withoutMe;
  if (special[i]) up[i] = take_better(up[i], make_pair(0, i), i);
  int numE = E[i].size();
  path best = up[i], second = make_pair(-1000000000, i),
       third = make_pair(-1000000000, i);
  for (int x = 0; x < (numE); ++x) {
    int j = E[i][x].first, c = E[i][x].second;
    if (j == p) continue;
    path here = down[j];
    here.first += c;
    if (here >= best) {
      third = second;
      second = best;
      best = here;
    } else if (here >= second) {
      third = second;
      second = here;
    } else if (here >= third) {
      third = here;
    }
  }
  for (int x = 0; x < (numE); ++x) {
    int j = E[i][x].first, c = E[i][x].second;
    if (j == p) continue;
    path withoutHim;
    path goHere = down[j];
    goHere.first += c;
    if (goHere == best)
      withoutHim = take_better(second, third, i);
    else if (goHere == second)
      withoutHim = take_better(best, third, i);
    else
      withoutHim = take_better(best, second, i);
    withoutHim.first += c;
    dfs2(j, i, withoutHim);
  }
}
int nth(int a, int n) {
  assert(n >= 0);
  for (int k = 0; n; n >>= 1, ++k)
    if (n & 1) a = par[a][k];
  return a;
}
int lca(int a, int b) {
  if (depth[a] < depth[b]) swap(a, b);
  a = nth(a, depth[a] - depth[b]);
  assert(depth[a] == depth[b]);
  for (int k = 18 - 1; k >= 0; --k)
    if (par[a][k] != par[b][k]) a = par[a][k], b = par[b][k];
  if (a != b) a = b = par[a][0];
  return a;
}
bool is_ancestor(int a, int b) { return lca(a, b) == a; }
void update(int i, int v) { add[i] += v; }
void add_path(int i, int j) {
  if (is_ancestor(i, j)) {
    update(j, 1);
    update(par[i][0], -1);
  } else if (is_ancestor(j, i)) {
    update(i, 1);
    update(par[j][0], -1);
  } else {
    int k = lca(i, j);
    update(i, 1);
    update(j, 1);
    update(k, -1);
    update(par[k][0], -1);
  }
}
void setup(int N) {
  for (int k = (1); k <= (18 - 1); ++k)
    for (int i = (1); i <= (N); ++i) par[i][k] = par[par[i][k - 1]][k - 1];
  for (int i = (1); i <= (N); ++i) {
    if (!special[i]) continue;
    path p = take_better(up[i], down[i], i);
    int j = p.second;
    add_path(i, j);
  }
}
int dfs3(int i, int p) {
  int sum = add[i];
  int numE = E[i].size();
  for (int x = 0; x < (numE); ++x) {
    int j = E[i][x].first;
    if (j == p) continue;
    sum += dfs3(j, i);
  }
  assert(sum >= 0);
  cover[i] = sum;
  return sum;
}
int main() {
  srand(time(NULL));
  int N, M, a, b, c;
  cin >> N >> M;
  for (int i = (1); i <= (M); ++i) {
    scanf("%d", &a);
    special[a] = true;
  }
  for (int i = (1); i <= (N - 1); ++i) {
    scanf("%d%d%d", &a, &b, &c);
    E[a].push_back(make_pair(b, c));
    E[b].push_back(make_pair(a, c));
  }
  path init(-1000000000, 1);
  dfs1(1, 0);
  dfs2(1, 0, init);
  setup(N);
  dfs3(1, 0);
  int mx = 0;
  int cnt = 0;
  for (int i = (1); i <= (N); ++i) {
    if (special[i]) continue;
    if (cover[i] == mx) {
      cnt++;
    } else if (cover[i] > mx) {
      mx = cover[i];
      cnt = 1;
    }
  }
  cout << mx << " " << cnt << endl;
}
