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 INPUT_MAXCHARS = 1 << 16;
char buffer[INPUT_MAXCHARS];
struct FastReader {
  char *p;
  FastReader() : p(buffer) { fread(buffer, 1, sizeof buffer, stdin); }
  int next_int() {
    int remchars = INPUT_MAXCHARS - (p - buffer);
    if (remchars < 25) {
      memcpy(buffer, p, remchars);
      size_t cnt = fread(buffer + remchars, 1, sizeof buffer - remchars, stdin);
      if (remchars + cnt < sizeof buffer) {
        buffer[remchars + cnt] = 0;
      }
      p = buffer;
    }
    while (*p < '0') {
      p++;
    }
    int val = 0;
    while (*p >= '0') {
      val = val * 10 + (*p - '0');
      ++p;
    }
    return val;
  }
};
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() {
  ios::sync_with_stdio(false);
  FastReader reader;
  int n, nmonasteries;
  n = reader.next_int();
  nmonasteries = reader.next_int();
  for (int i = 0; i < nmonasteries; ++i) {
    int j = reader.next_int();
    is_monastery[j - 1] = 1;
  }
  G.assign(n, vector<pair<int, int> >());
  for (int i = 1; i < n; ++i) {
    int a, b, c;
    a = reader.next_int();
    b = reader.next_int();
    c = reader.next_int();
    --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;
    }
  }
  printf("%d %d\n", sol, ways);
  return 0;
}
