#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
const int LOGN = 18;
bool is_monastery[MAXN];
vector<vector<pair<int, int> > > G;
int depth[MAXN];
int cnt[MAXN];
int P[LOGN + 1][MAXN];
void parents(int u, int p) {
  P[0][u] = p;
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i].first;
    if (v != p) {
      parents(v, u);
    }
  }
}
void depths(int u, int p, int d) {
  depth[u] = d;
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i].first;
    if (v != p) {
      depths(v, u, d + 1);
    }
  }
}
int lca(int u, int v) {
  if (depth[u] < depth[v]) {
    swap(u, v);
  }
  for (int level = LOGN; level >= 0; --level) {
    if (P[level][u] != -1 && depth[P[level][u]] >= depth[v]) {
      u = P[level][u];
    }
  }
  if (u == v) {
    return u;
  }
  for (int level = LOGN; level >= 0; --level) {
    if (P[level][u] != P[level][v]) {
      u = P[level][u];
      v = P[level][v];
    }
  }
  return P[0][u];
}
struct path {
  int len, to;
};
path down[MAXN];
void upd(const path &tmp, path &p1, path &p2) {
  if (p1.len == -1) {
    p1 = tmp;
  } else if (tmp.len >= p1.len) {
    p2 = p1;
    p1 = tmp;
  } else if (tmp.len > p2.len) {
    p2 = tmp;
  }
}
void downdist(int u, int p) {
  path p1, p2;
  p1.len = p2.len = -1;
  p1.to = p2.to = -1;
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i].first;
    if (v != p) {
      int w = G[u][i].second;
      downdist(v, u);
      if (down[v].len != -1) {
        upd((path){down[v].len + w, down[v].to}, p1, p2);
      }
    }
  }
  if (is_monastery[u]) {
    upd((path){0, u}, p1, p2);
  }
  down[u] = p1;
  if (p1.len == p2.len) {
    down[u].to = u;
  }
}
void mark(int u, int v) {
  int w = lca(u, v);
  ++cnt[u];
  ++cnt[v];
  --cnt[w];
  if (P[0][w] != -1) {
    --cnt[P[0][w]];
  }
}
void updist(int u, int p, const path &up) {
  path p1, p2;
  p1.len = p2.len = -1;
  p1.to = p2.to = -1;
  upd(up, p1, p2);
  upd(down[u], p1, p2);
  if (is_monastery[u] && p1.len != p2.len) {
    mark(u, p1.to);
  }
  vector<path> l1(1, (path){-1, -1});
  vector<path> l2(1, (path){-1, -1});
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i].first;
    int w = G[u][i].second;
    l1.push_back(l1.back());
    l2.push_back(l2.back());
    if (v == p) continue;
    if (down[v].len != -1) {
      upd((path){down[v].len + w, down[v].to}, l1.back(), l2.back());
    }
  }
  vector<path> r1(1, (path){-1, -1});
  vector<path> r2(1, (path){-1, -1});
  for (int i = (int)G[u].size() - 1; i >= 0; --i) {
    int v = G[u][i].first;
    int w = G[u][i].second;
    r1.push_back(r1.back());
    r2.push_back(r2.back());
    if (v == p) continue;
    if (down[v].len != -1) {
      upd((path){down[v].len + w, down[v].to}, r1.back(), r2.back());
    }
  }
  reverse(r1.begin(), r1.end());
  reverse(r2.begin(), r2.end());
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i].first;
    if (v == p) continue;
    int w = G[u][i].second;
    p1.len = p2.len = -1;
    p1.to = p2.to = -1;
    if (up.len != -1) {
      upd((path){up.len + w, up.to}, p1, p2);
    }
    if (l1[i].len != -1) {
      upd((path){l1[i].len + w, l1[i].to}, p1, p2);
    }
    if (l2[i].len != -1) {
      upd((path){l2[i].len + w, l2[i].to}, p1, p2);
    }
    if (r1[i + 1].len != -1) {
      upd((path){r1[i + 1].len + w, r1[i + 1].to}, p1, p2);
    }
    if (r2[i + 1].len != -1) {
      upd((path){r2[i + 1].len + w, r2[i + 1].to}, p1, p2);
    }
    if (is_monastery[u]) {
      upd((path){w, u}, p1, p2);
    }
    if (p1.len == p2.len) {
      p1.to = u;
    }
    updist(v, u, p1);
  }
}
void propagate(int u, int p) {
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i].first;
    if (v != p) {
      propagate(v, u);
      cnt[u] += cnt[v];
    }
  }
}
int main() {
  int n, nmonasteries;
  cin >> n >> nmonasteries;
  for (int i = 0; i < nmonasteries; ++i) {
    int j;
    cin >> j;
    is_monastery[j - 1] = 1;
  }
  G.assign(n, vector<pair<int, int> >());
  for (int i = 1; i < n; ++i) {
    int a, b, c;
    cin >> a >> b >> c;
    --a;
    --b;
    G[a].push_back(make_pair(b, c));
    G[b].push_back(make_pair(a, c));
  }
  parents(0, -1);
  for (int level = 1; level <= LOGN; ++level) {
    for (int u = 0; u < n; ++u) {
      P[level][u] =
          (P[level - 1][u] == -1 ? -1 : P[level - 1][P[level - 1][u]]);
    }
  }
  depths(0, -1, 0);
  downdist(0, -1);
  updist(0, -1, (path){-1, -1});
  propagate(0, -1);
  int sol = -1;
  int ways = 0;
  for (int i = 0; i < n; ++i) {
    if (is_monastery[i]) continue;
    if (cnt[i] > sol) {
      sol = cnt[i];
      ways = 1;
    } else if (cnt[i] == sol) {
      ++ways;
    }
  }
  cout << sol << ' ' << ways << '\n';
  return 0;
}
