#include <bits/stdc++.h>
using namespace std;
int qi, pi, size[200000], size1[200000], deep[200000], fa[200000], len,
    len1 = -1;
int tot, n, m, ans, d[300000], en[300000], pre[300000];
bool co[200000];
void setl(int x, int y) {
  tot++;
  pre[tot] = d[x];
  d[x] = tot;
  en[tot] = y;
}
void dfs(int u, int f) {
  int i, k, v;
  k = d[u];
  deep[u] = deep[f] + 1;
  size[u] = 1;
  if (co[u]) size1[u] = 1;
  while (k != 0) {
    v = en[k];
    if (f != v) {
      dfs(v, u);
      size[u] += size[v];
      size1[u] += size1[v];
    }
    k = pre[k];
  }
  if (deep[u] > len && size1[u] > 0) {
    len = deep[u];
    qi = u;
  }
}
void dfs1(int u, int f) {
  int i, k, v;
  fa[u] = f;
  k = d[u];
  deep[u] = deep[f] + 1;
  size[u] = 1;
  while (k != 0) {
    v = en[k];
    if (f != v && co[v]) {
      dfs1(v, u);
      size[u] += size[v];
    }
    k = pre[k];
  }
  if (deep[u] > len) {
    len = deep[u];
    pi = u;
  }
}
void dfs2(int u, int f) {
  int i, k, v;
  k = d[u];
  deep[u] = deep[f] + 1;
  while (k != 0) {
    v = en[k];
    if (f != v && co[v]) {
      dfs2(v, u);
    }
    k = pre[k];
  }
  if (deep[u] > len1) {
    len1 = deep[u];
    qi = u;
  } else if (deep[u] == len1) {
    qi = min(qi, u);
  }
}
int main() {
  cin >> n >> m;
  int i, j, k, a, b, x, ans;
  memset(co, 0, sizeof(co));
  for (i = 1; i <= n - 1; i++) {
    scanf("%d%d", &a, &b);
    setl(a, b);
    setl(b, a);
  }
  for (i = 1; i <= m; i++) {
    scanf("%d", &x);
    co[x] = 1;
  }
  dfs(x, 0);
  memset(co, 1, sizeof(co));
  for (i = 1; i <= n; i++)
    if (size1[i] == 0) co[i] = 0;
  memset(deep, 0, sizeof(deep));
  len = 0;
  memset(size, 0, sizeof(size));
  dfs1(qi, 0);
  ans = (size[qi] - 1) * 2 - (len - 1);
  len--;
  while (pi) {
    if (deep[pi] - 1 == (len + 1) / 2) break;
    pi = fa[pi];
  }
  memset(deep, 0, sizeof(deep));
  deep[0] = -1;
  qi = 1 << 30;
  dfs2(pi, 0);
  memset(deep, 0, sizeof(deep));
  deep[0] = -1;
  if (len % 2 == 1) {
    pi = fa[pi];
    dfs2(pi, 0);
  }
  cout << qi << endl;
  cout << ans;
}
