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;
struct node {
  int x;
  long long w;
};
int n, m;
vector<vector<node> > adj;
vector<bool> mon;
long long bit[200004];
void inc(int x, long long w) {
  if (x >= 200004) return;
  int a = x & (-x);
  bit[x] += w;
  inc(x + a, w);
}
int val(int x) {
  if (x == 0) return 0;
  int a = x & (-x);
  return bit[x] + val(x - a);
}
void rinc(int a, int b, long long w) {
  inc(a, w);
  inc(b + 1, 0 - w);
}
struct inf {
  long long m;
  int v;
  long long m1, m2;
  int c;
  int v1, v2;
  long long u;
  int u1, u2;
};
vector<inf> info;
vector<int> st, en;
int cnt = 1;
vector<bool> vis;
void dfs1(int x, int p = -1) {
  st[x] = cnt;
  cnt++;
  vis[x] = 1;
  vector<node> ed;
  bool all = 1;
  for (int i = 0; i < (int)adj[x].size(); ++i) {
    node now = adj[x][i];
    if (!vis[now.x]) {
      dfs1(now.x, x);
      ed.push_back(now);
      if (info[now.x].m >= 0) all = 0;
    }
  }
  if (ed.size() == 0) {
    if (mon[x]) {
      info[x].m = 0;
      info[x].v = x;
    }
  } else {
    if (all) {
      if (mon[x]) {
        info[x].m = 0;
        info[x].v = x;
      }
    } else {
      for (int i = 0; i < (int)ed.size(); ++i) {
        node now = ed[i];
        if (info[now.x].m + now.w > info[x].m1) {
          info[x].m1 = info[now.x].m + now.w;
          info[x].c = now.x;
          info[x].v1 = info[now.x].v;
        }
      }
      for (int i = 0; i < (int)ed.size(); ++i) {
        node now = ed[i];
        if (info[now.x].m + now.w > info[x].m2 && now.x != info[x].c) {
          info[x].m2 = info[now.x].m + now.w;
          info[x].v2 = info[now.x].v;
        }
      }
      if (info[x].m1 == info[x].m2) {
        info[x].v = x;
        info[x].m = info[x].m1;
      } else if (info[x].m1 > info[x].m2) {
        info[x].v = info[x].v1;
        info[x].m = info[x].m1;
      } else {
        info[x].v = info[x].v2;
        info[x].m = info[x].m2;
      }
    }
  }
  en[x] = cnt;
  cnt++;
}
void dfs2(int x, int p = -1, long long w = 0) {
  vis[x] = 1;
  if (p != -1) {
    if (info[p].m <= 0) {
      info[x].u = info[p].u;
      info[x].u1 = info[p].u1;
      info[x].u2 = info[p].u2;
    } else {
      if (x == info[p].c) {
        if (info[p].m2 < 0) {
          info[x].u = info[p].u;
          info[x].u1 = info[p].u1;
          info[x].u2 = info[p].u2;
        } else {
          long long c1 = w + info[p].m2;
          if (c1 > info[p].u + w) {
            info[x].u = c1;
            info[x].u1 = p;
            info[x].u2 = info[p].v2;
          } else if (c1 == info[p].u + w) {
            info[x].u = c1;
            info[x].u1 = p;
            info[x].u2 = -1;
          } else {
            info[x].u = info[p].u + w;
            info[x].u1 = info[p].u1;
            info[x].u2 = info[p].u2;
          }
        }
      } else {
        long long c1 = w + info[p].m1;
        if (c1 > info[p].u + w) {
          info[x].u = c1;
          info[x].u1 = p;
          info[x].u2 = info[p].v1;
        } else if (c1 == info[p].u + w) {
          info[x].u = c1;
          info[x].u1 = p;
          info[x].u2 = -1;
        } else {
          info[x].u = info[p].u + w;
          info[x].u1 = info[p].u1;
          info[x].u2 = info[p].u2;
        }
      }
    }
  }
  for (int i = 0; i < (int)adj[x].size(); ++i) {
    node now = adj[x][i];
    if (!vis[now.x]) dfs2(now.x, x, now.w);
  }
}
void vinc(int a, int b) { rinc(en[b], en[a], 1); }
void vdec(int x) { rinc(en[x], en[x], -1); }
int main() {
  scanf("%d%d", &n, &m);
  adj.resize(n);
  mon.resize(n);
  for (int i = 0; i < m; ++i) {
    int x;
    scanf("%d", &x);
    mon[x - 1] = 1;
  }
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    long long w;
    scanf("%d%d%lld", &a, &b, &w);
    a--;
    b--;
    node now = {a, w};
    adj[b].push_back(now);
    now.x = b;
    adj[a].push_back(now);
  }
  info.resize(n);
  st.resize(n);
  en.resize(n);
  vis.resize(n);
  for (int i = 0; i < n; ++i) {
    info[i].m = info[i].v = info[i].m1 = info[i].m2 = info[i].c = info[i].v1 =
        info[i].v2 = -1;
    info[i].u = info[i].u1 = info[i].u2 = -1;
  }
  for (int i = 0; i < n; ++i) vis[i] = 0;
  dfs1(0);
  for (int i = 0; i < n; ++i) vis[i] = 0;
  dfs2(0);
  for (int i = 0; i < n; ++i)
    if (mon[i]) {
      if (info[i].m1 > info[i].u) {
        vinc(i, info[i].v1);
      } else if (info[i].u > info[i].m1) {
        vinc(info[i].u1, i);
        if (info[i].u2 >= 0) {
          vinc(info[i].u1, info[i].u2);
          vdec(info[i].u1);
        }
      }
    }
  for (int i = 0; i < n; ++i) {
  }
  int fans = -1, fcnt = 0;
  for (int i = 0; i < n; ++i)
    if (!mon[i]) {
      int v = val(en[i]) - val(st[i]);
      if (v > fans) {
        fans = v;
        fcnt = 1;
      } else if (v == fans) {
        fcnt++;
      }
    }
  printf("%d %d\n", fans, fcnt);
  return 0;
}
