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 long long inf = 0x20202020;
const long long mod = 1000000007;
const double eps = 1e-9;
const double pi = 3.1415926535897932384626;
const int DX[] = {1, 0, -1, 0}, DY[] = {0, 1, 0, -1};
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 101000;
int n, k, cp, cd, d[N], fg[N];
int stk[N], top, u, v, w, len, sz[N], bsz[N];
int ansc, ansp;
vector<pair<int, int> > e[N], pth;
vector<int> vs[N], brh, pst;
void dfs(int u, int f, int dep) {
  if (dep > cd) {
    cd = dep;
    cp = u;
  }
  for (int i = 0; i < (int)((int)(e[u]).size()); i++) {
    int v = e[u][i].first;
    if (v == f) continue;
    dfs(v, u, dep + e[u][i].second);
  }
}
void getpath(int u, int f, int ter, int dep) {
  d[u] = dep;
  stk[top++] = u;
  if (u == ter) {
    for (int i = 0; i < (int)top; i++)
      pth.push_back(make_pair(stk[i], d[stk[i]]));
    throw 1;
  }
  for (int i = 0; i < (int)((int)(e[u]).size()); i++) {
    int v = e[u][i].first;
    if (v == f) continue;
    getpath(v, u, ter, dep + e[u][i].second);
  }
  --top;
}
int getcenter() {
  cp = 1, cd = 0;
  dfs(1, 0, 0);
  cd = 0;
  int u = cp;
  dfs(cp, 0, 0);
  try {
    getpath(u, 0, cp, 0);
  } catch (int e) {
  }
  len = pth[((int)(pth).size()) - 1].second / 2;
  for (int i = 0; i < (int)((int)(pth).size()); i++)
    if (pth[i].second == len)
      return pth[i].first;
    else {
      for (int i = 0; i < (int)((int)(pth).size()) - 1; i++)
        if (pth[i].second < len && pth[i + 1].second > len) {
          int u = pth[i].first, v = pth[i + 1].first;
          for (vector<pair<int, int> >::iterator it = e[u].begin();
               it != e[u].end(); it++)
            if (it->first == v) {
              e[u].erase(it);
              break;
            }
          for (vector<pair<int, int> >::iterator it = e[v].begin();
               it != e[v].end(); it++)
            if (it->first == u) {
              e[v].erase(it);
              break;
            }
          e[u].push_back(make_pair(n + 1, len - pth[i].second));
          e[v].push_back(make_pair(n + 1, pth[i + 1].second - len));
          e[n + 1].push_back(make_pair(u, len - pth[i].second));
          e[n + 1].push_back(make_pair(v, pth[i + 1].second - len));
          ++n;
          fg[n] = 1;
          return n;
        }
    }
  return 0;
}
bool check(int u, int f, int dep, int rt) {
  sz[u] = fg[u];
  if (dep == len) {
    pst.push_back(u);
    bsz[u] = 1;
    return 1;
  }
  vs[rt].push_back(u);
  bool rs = 0;
  for (int i = 0; i < (int)((int)(e[u]).size()); i++) {
    int v = e[u][i].first;
    if (v == f) continue;
    rs |= check(v, u, dep + e[u][i].second, rt);
    sz[u] += sz[v];
    bsz[u] += bsz[v];
  }
  return rs;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < (int)k; i++) scanf("%d", &u), fg[u] = 1;
  for (int i = 1; i < (int)n; i++) {
    scanf("%d%d%d", &u, &v, &w);
    e[u].push_back(make_pair(v, 2 * w));
    e[v].push_back(make_pair(u, 2 * w));
  }
  u = getcenter();
  if (!fg[u]) ansc = k, ansp = 1;
  for (int i = 0; i < (int)((int)(e[u]).size()); i++) {
    if (check(e[u][i].first, u, e[u][i].second, e[u][i].first))
      brh.push_back(e[u][i].first);
  }
  for (int i = 0; i < (int)((int)(brh).size()); i++) {
    u = brh[i];
    for (int j = 0; j < (int)((int)(vs[u]).size()); j++) {
      v = vs[u][j];
      if (!fg[v]) {
        int pc = 0;
        if (bsz[v] != bsz[u] || ((int)(brh).size()) > 2)
          pc = sz[v];
        else
          pc = k - (sz[u] - sz[v]);
        if (pc > ansc)
          ansc = k, ansp = 1;
        else if (pc == ansc)
          ansp++;
      }
    }
  }
  printf("%d %d\n", ansc, ansp);
}
