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 int MAXN = 100000;
struct edge {
  int v, len, rev;
  edge(int _v = 0, int _len = 0, int _rev = 0) : v(_v), len(_len), rev(_rev) {}
};
vector<edge> ve[MAXN + 10];
int c[MAXN + 10], par[17][MAXN + 10], dep[MAXN + 10];
void comp_par(int v, int p, int d) {
  if (p != -1) {
    par[0][v] = p;
  }
  dep[v] = d;
  for (__typeof((ve[v]).begin()) it = (ve[v]).begin(); it != (ve[v]).end();
       ++it) {
    int w = it->v;
    if (w != p) {
      comp_par(w, v, d + 1);
    }
  }
}
void par_tab(int n) {
  for (int l = 1; (1 << l) < n; ++l) {
    for (int i = 0; i < (n); ++i) {
      if (par[l - 1][i] == -1) {
        par[l][i] = -1;
      } else {
        par[l][i] = par[l - 1][par[l - 1][i]];
      }
    }
  }
}
int kth_anc(int a, int k) {
  for (int l = 0; (1 << l) <= k; ++l) {
    if (k & (1 << l)) {
      a = par[l][a];
    }
  }
  return a;
}
int lca(int a, int b) {
  if (dep[a] > dep[b]) {
    swap(a, b);
  }
  b = kth_anc(b, dep[b] - dep[a]);
  if (a == b) {
    return a;
  }
  int l = 0;
  for (; (1 << l) <= dep[a]; ++l)
    ;
  int res = 0;
  for (--l; l >= 0; --l) {
    if (par[l][a] != par[l][b]) {
      a = par[l][a];
      b = par[l][b];
    } else {
      res = par[l][a];
    }
  }
  return res;
}
pair<int, int> SL(int, int);
pair<int, int> SR(int, int);
pair<int, int> R(int v, int e) {
  pair<int, int> a = SL(v, e - 1), b = SR(v, e + 1);
  if (a < b) {
    swap(a, b);
  }
  if (a.first == -1) {
    if (c[v] == 1) {
      return make_pair(0, v);
    } else {
      return make_pair(-1, -1);
    }
  } else if (a.first > b.first) {
    return a;
  } else {
    return make_pair(a.first, v);
  }
}
pair<int, int> combine(int v, int e, pair<int, int> aggr, pair<int, int> nw) {
  if (nw.first != -1) {
    nw.first += ve[v][e].len;
    if (aggr.first == -1 || nw.first > aggr.first) {
      aggr = nw;
    } else if (nw.first == aggr.first) {
      aggr.second = v;
    }
  }
  return aggr;
}
vector<pair<int, int> > dpl[MAXN + 10], dpr[MAXN + 10];
pair<int, int> SL(int v, int e) {
  if (e <= -1) {
    return make_pair(-1, -1);
  }
  if (dpl[v][e] != make_pair(-2, -2)) {
    return dpl[v][e];
  }
  return dpl[v][e] = combine(v, e, SL(v, e - 1), R(ve[v][e].v, ve[v][e].rev));
}
pair<int, int> SR(int v, int e) {
  if (e >= ((int)((ve[v]).size()))) {
    return make_pair(-1, -1);
  }
  if (dpr[v][e] != make_pair(-2, -2)) {
    return dpr[v][e];
  }
  return dpr[v][e] = combine(v, e, SR(v, e + 1), R(ve[v][e].v, ve[v][e].rev));
}
int add[MAXN + 10], sub[MAXN + 10];
pair<int, int> res;
int comp_res(int v) {
  int sum = 0;
  for (__typeof((ve[v]).begin()) it = (ve[v]).begin(); it != (ve[v]).end();
       ++it) {
    const edge &e = *it;
    if (e.v != par[0][v]) {
      sum += comp_res(e.v);
    }
  }
  sum += add[v];
  if (!c[v]) {
    int can = sum - sub[v];
    if (can > res.first) {
      res = make_pair(can, 1);
    } else if (can == res.first) {
      ++res.second;
    }
  }
  sum -= 2 * sub[v];
  return sum;
}
int main(void) {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (m); ++i) {
    int v;
    scanf("%d", &v);
    --v;
    c[v] = 1;
  }
  for (int i = 0; i < (n - 1); ++i) {
    int a, b, l;
    scanf("%d%d%d", &a, &b, &l);
    --a;
    --b;
    ve[a].push_back(edge(b, l, ((int)((ve[b]).size()))));
    ve[b].push_back(edge(a, l, ((int)((ve[a]).size())) - 1));
  }
  for (int i = 0; i < (n); ++i) {
    dpl[i] =
        vector<pair<int, int> >(((int)((ve[i]).size())), make_pair(-2, -2));
    dpr[i] =
        vector<pair<int, int> >(((int)((ve[i]).size())), make_pair(-2, -2));
  }
  comp_par(0, -1, 0);
  par_tab(n);
  for (int i = 0; i < (n); ++i) {
    if (!c[i]) {
      continue;
    }
    int mx = 0, bad = 0, end = 0;
    for (__typeof((ve[i]).begin()) it = (ve[i]).begin(); it != (ve[i]).end();
         ++it) {
      const edge &e = *it;
      pair<int, int> g = R(e.v, e.rev);
      if (g.first != -1) {
        if (g.first + e.len == mx) {
          bad = 1;
        } else if (g.first + e.len > mx) {
          mx = g.first + e.len;
          bad = 0;
          end = g.second;
        }
      }
    }
    if (bad) {
      continue;
    }
    assert(mx != 0);
    int p = lca(i, end);
    ++sub[p];
    ++add[i];
    ++add[end];
  }
  comp_res(0);
  printf("%d %d\n", res.first, res.second);
  return 0;
}
