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 max_n = 100111, max_log = 20, inf = 1e9 + 100;
vector<pair<int, int> > v[max_n];
vector<pair<int, int> > to_add;
int n, m;
bool is_p[max_n];
pair<int, int> dp[max_n];
int cnt_off[max_n];
void dfs(int cur, int pr) {
  if (v[cur].size() == 1) {
    dp[cur] = {0, cur};
    return;
  }
  vector<pair<int, int> > ch;
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    int elen = v[cur][i].second;
    if (to == pr) {
      continue;
    }
    dfs(to, cur);
    ch.emplace_back(dp[to].first + elen, dp[to].second);
  }
  sort(ch.begin(), ch.end());
  reverse(ch.begin(), ch.end());
  if (ch.size() == 1) {
    dp[cur] = ch[0];
    return;
  }
  if (ch[0].first == ch[1].first) {
    dp[cur] = {ch[0].first, cur};
  } else {
    dp[cur] = ch[0];
  }
}
void dfs_back(int cur, int pr, pair<int, int> top) {
  multiset<pair<int, int> > ch;
  if (pr != -1) {
    ch.insert(top);
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    int elen = v[cur][i].second;
    if (to == pr) {
      continue;
    }
    ch.emplace(dp[to].first + elen, dp[to].second);
  }
  if (is_p[cur]) {
    if (ch.size() == 1) {
      to_add.emplace_back(cur, ch.rbegin()->second);
    }
    auto it = ch.rbegin();
    pair<int, int> f = *it;
    ++it;
    pair<int, int> s = *it;
    if (f.first > s.first) {
      to_add.emplace_back(cur, f.second);
    }
  }
  if (v[cur].size() == 1) {
    return;
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    int elen = v[cur][i].second;
    if (to == pr) {
      continue;
    }
    pair<int, int> ch_val = {dp[to].first + elen, dp[to].second};
    ch.erase(ch.find(ch_val));
    if (ch.size() == 1) {
      dfs_back(to, cur, {ch.begin()->first + elen, ch.begin()->second});
    } else {
      auto it = ch.rbegin();
      pair<int, int> f = *it;
      ++it;
      pair<int, int> s = *it;
      if (f.first > s.first) {
        dfs_back(to, cur, {f.first + elen, f.second});
      } else {
        dfs_back(to, cur, {f.first + elen, cur});
      }
    }
    ch.insert(ch_val);
  }
}
int tin[max_n];
int tout[max_n];
int cur_time = 0;
int pr[max_n][max_log];
void dfs_lca(int cur, int p) {
  tin[cur] = cur_time++;
  pr[cur][0] = p;
  for (int l = 0; l < max_log; ++l) {
    if (pr[cur][l] != -1 && pr[pr[cur][l]][l] != -1) {
      pr[cur][l + 1] = pr[pr[cur][l]][l];
    } else {
      break;
    }
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    if (to != p) {
      dfs_lca(to, cur);
    }
  }
  tout[cur] = cur_time++;
}
bool is_anc(int a, int b) {
  if (a == -1) {
    return true;
  }
  return tin[a] <= tin[b] && tout[a] >= tout[b];
}
int lca(int a, int b) {
  if (is_anc(a, b)) {
    return a;
  }
  if (is_anc(b, a)) {
    return b;
  }
  for (int l = max_log; l > 0; --l) {
    if (!is_anc(pr[a][l - 1], b)) {
      a = pr[a][l - 1];
    }
  }
  return pr[a][0];
}
struct segment_tree {
  int tr[max_n * 4];
  void add(int cur, int l, int r, int ql, int qr, int val) {
    if (l == ql && r == qr) {
      tr[cur] += val;
      return;
    }
    if (l > qr || r < ql) {
      return;
    }
    int mid = (l + r) / 2;
    add(cur * 2, l, mid, ql, min(qr, mid), val);
    add(cur * 2 + 1, mid + 1, r, max(ql, mid + 1), qr, val);
  }
  int get(int cur, int l, int r, int pos) {
    if (l == r) {
      return tr[cur];
    }
    int mid = (l + r) / 2;
    if (pos <= mid) {
      return get(cur * 2, l, mid, pos) + tr[cur];
    } else {
      return get(cur * 2 + 1, mid + 1, r, pos) + tr[cur];
    }
  }
} st;
int sz[max_n];
int start[max_n];
int pos[max_n];
int cur_pos = 0;
void dfs_size(int cur, int pr) {
  if (v[cur].size() == 1) {
    sz[cur] = 1;
    return;
  }
  for (auto& to : v[cur]) {
    if (to.first == pr) continue;
    dfs_size(to.first, cur);
    if (v[cur][0].first == pr || sz[v[cur][0].first] < sz[to.first]) {
      swap(v[cur][0], to);
    }
  }
}
void dfs_hld(int cur, int pr, int st) {
  pos[cur] = cur_pos++;
  start[cur] = st;
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    if (to == pr) continue;
    if (i == 0) {
      dfs_hld(to, cur, st);
    } else {
      dfs_hld(to, cur, to);
    }
  }
}
void add(int cur, int root, int val) {
  while (true) {
    st.add(1, 0, max_n - 1, pos[start[cur]], pos[cur], val);
    cur = start[cur];
    if (cur == root) break;
    cur = pr[cur][0];
  }
}
int get(int cur) { return st.get(1, 0, max_n - 1, pos[cur]); }
bool dfs_dumb(int cur, int pr, int fin) {
  if (cur == fin) {
    cnt_off[cur]++;
    return true;
  }
  for (int i = 0; i < v[cur].size(); ++i) {
    int to = v[cur][i].first;
    if (to == pr) {
      continue;
    }
    if (dfs_dumb(to, cur, fin)) {
      cnt_off[cur]++;
      return true;
    }
  }
  return false;
}
int main() {
  for (int i = 0; i < max_n; ++i) {
    for (int j = 0; j < max_log; ++j) {
      pr[i][j] = -1;
    }
  }
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int a;
    scanf("%d", &a);
    --a;
    is_p[a] = 1;
  }
  for (int i = 0; i + 1 < n; ++i) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    --a, --b;
    v[a].emplace_back(b, c);
    v[b].emplace_back(a, c);
  }
  int root;
  for (int i = 0; i < n; ++i) {
    if (v[i].size() > 1) {
      root = i;
      break;
    }
  }
  dfs(root, -1);
  dfs_back(root, -1, {-1, -1});
  for (auto path : to_add) {
    int from = path.first, to = path.second;
    dfs_dumb(from, -1, to);
  }
  int mx = -1, cntmx = 0;
  for (int i = 0; i < n; ++i) {
    if (is_p[i]) {
      continue;
    }
    if (cnt_off[i] > mx) {
      mx = cnt_off[i];
      cntmx = 1;
    } else if (cnt_off[i] == mx) {
      ++cntmx;
    }
  }
  cout << mx << ' ' << cntmx << endl;
  return 0;
}
