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 int MOD = 1000000007;
const long long BIG = 1446803456761533460;
const int Big = 336860180;
stringstream sss;
const long long int maxn = 100010;
const long long int maxnlg = 20;
long long int n, m;
vector<pair<long long int, long long int> > g[maxn];
bool mon[maxn];
pair<long long int, long long int> down[maxn], up[maxn];
long long int ps[maxn];
long long int st[maxn], ft[maxn], pars[maxnlg][maxn];
long long int tim = 0;
void dfs_down(long long int x, long long int par) {
  st[x] = tim++;
  pars[0][x] = par;
  for (long long int i = (0); i < (maxnlg - 1); ++i) {
    pars[i + 1][x] = pars[i][pars[i][x]];
  }
  down[x] = {mon[x] ? 0 : -BIG, x};
  for (auto y : g[x]) {
    long long int v = y.first, w = y.second;
    if (v == par) continue;
    dfs_down(v, x);
    if (down[v].first + w > down[x].first) {
      down[x] = {down[v].first + w, down[v].second};
    } else if (down[v].first + w == down[x].first) {
      down[x].second = x;
    }
  }
  ft[x] = tim;
}
void dfs_up(long long int x, long long int par) {
  vector<pair<pair<long long int, long long int>, long long int> > vals;
  vals.push_back({up[x], -1});
  vals.push_back({{mon[x] ? 0 : -BIG, x}, x});
  for (auto y : g[x]) {
    long long int v = y.first, w = y.second;
    if (v == par) continue;
    vals.push_back({{down[v].first + w, down[v].second}, v});
  }
  sort((vals).begin(), (vals).end(),
       greater<pair<pair<long long int, long long int>, long long int> >());
  long long int valn = vals.size();
  long long int mxc = 0;
  while (mxc < valn && vals[mxc].first.first == vals[0].first.first) ++mxc;
  for (auto y : g[x]) {
    long long int v = y.first, w = y.second;
    if (v == par) continue;
    if (mxc == 1 && v == vals[0].second) {
      up[v].first = vals[1].first.first + w;
      if (vals[1].first.first == vals[2].first.first)
        up[v].second = x;
      else
        up[v].second = vals[1].first.second;
    } else if (mxc == 2 && v == vals[0].second) {
      up[v] = {vals[1].first.first + w, vals[1].first.second};
    } else if (mxc == 1 || mxc == 2 && v == vals[1].second) {
      up[v] = {vals[0].first.first + w, vals[0].first.second};
    } else {
      up[v] = {vals[0].first.first + w, x};
    }
    dfs_up(v, x);
  }
}
long long int LCA(long long int a, long long int b) {
  if (st[a] > st[b]) swap(a, b);
  if (ft[a] >= ft[b]) return a;
  for (long long int i = (maxnlg)-1; i >= (0); --i) {
    if (ft[pars[i][a]] < ft[b]) {
      a = pars[i][a];
    }
  }
  return pars[0][a];
}
void dfs_cnt(long long int x, long long int par) {
  for (auto y : g[x]) {
    long long int v = y.first;
    if (v != par) {
      dfs_cnt(v, x);
      ps[x] += ps[v];
    }
  }
}
void MAIN() {
  cin >> n >> m;
  for (long long int i = (0); i < (m); ++i) {
    long long int x;
    cin >> x;
    --x;
    mon[x] = true;
  }
  for (long long int i = (0); i < (n - 1); ++i) {
    long long int a, b, c;
    cin >> a >> b >> c;
    --a, --b;
    g[a].emplace_back(b, c), g[b].emplace_back(a, c);
  }
  dfs_down(0, 0);
  up[0] = {-BIG, -1};
  dfs_up(0, -1);
  pars[0][0] = n;
  for (long long int x = (0); x < (n); ++x) {
    if (!mon[x]) continue;
    if (down[x].first > up[x].first) {
      ps[down[x].second]++;
      ps[x]--;
    }
    if (up[x].first > down[x].first) {
      ps[x]++;
      ps[up[x].second]++;
      long long int lca = LCA(x, up[x].second);
      ps[lca]--;
      ps[pars[0][lca]]--;
    }
  }
  dfs_cnt(0, 0);
  long long int mx = 0;
  long long int cnt = 0;
  for (long long int i = (0); i < (n); ++i) {
    if (mon[i]) continue;
    if (ps[i] > mx)
      mx = ps[i], cnt = 1;
    else if (ps[i] == mx)
      ++cnt;
  }
  cout << mx << ' ' << cnt;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(10);
  sss << R"(
8 5
7 2 5 4 8
1 2 1
2 3 2
1 4 1
4 5 2
1 6 1
6 7 8
6 8 10
    )";
  MAIN();
  return 0;
}
