#include <bits/stdc++.h>
using namespace std;
struct edge {
  int to, next;
} e[123457 << 1];
int n, m, ans, ID, cnt, tot, ans2, last[123457], fa[123457], son[123457],
    dep[123457], sz[123457], top[123457], x, y, i, j, q[123457], M[123457], P,
    ans1;
bool vis[123457], o[123457];
inline int read() {
  int x = 0;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch <= '9' && ch >= '0'; x = x * 10 + ch - 48, ch = getchar())
    ;
  return x;
}
inline void add(int u, int v) {
  e[++cnt] = (edge){v, last[u]}, last[u] = cnt;
  e[++cnt] = (edge){u, last[v]}, last[v] = cnt;
}
void dfs1(int x, int d) {
  sz[x] = 1, dep[x] = d;
  for (int y, i = last[x]; i; i = e[i].next)
    if ((y = e[i].to) != fa[x]) {
      fa[y] = x, dfs1(y, d + 1);
      if (sz[y] > sz[son[x]]) son[x] = y;
      sz[x] += sz[y];
    }
}
void dfs2(int x, int d) {
  top[x] = d;
  if (son[x]) dfs2(son[x], d);
  for (int y, i = last[x]; i; i = e[i].next)
    if ((y = e[i].to) != fa[x] && y != son[x]) dfs2(y, y);
}
void dfs3(int x, int d) {
  sz[x] = 1, dep[x] = max(dep[x], d);
  for (int y, i = last[x]; i; i = e[i].next)
    if ((y = e[i].to) != fa[x]) {
      fa[y] = x, dfs3(y, d + 1);
      if (sz[y] > sz[son[x]]) son[x] = y;
      sz[x] += sz[y];
    }
}
inline int Lca(int l, int r) {
  while (top[l] != top[r])
    if (dep[top[l]] < dep[top[r]])
      r = fa[top[r]];
    else
      l = fa[top[l]];
  return dep[r] < dep[l] ? r : l;
}
inline void bfs(int x) {
  memset(vis, 0, sizeof vis);
  int l = 1, r = 1, now = 0, id = x;
  q[r] = x;
  vis[x] = 1;
  while (l <= r) {
    int len = r - l + 1;
    for (int j = 1; j <= len; ++j) {
      int k = q[l++];
      for (int i = last[k]; i; i = e[i].next)
        if (!vis[e[i].to]) {
          q[++r] = e[i].to, vis[e[i].to] = 1;
          if (o[e[i].to]) id = e[i].to;
        }
    }
  }
  ID = id, ans2 = dep[x] + dep[id] - (dep[Lca(x, id)] << 1);
}
inline bool cmp(const int &a, const int &b) { return dep[a] < dep[b]; }
void dfs(int x) {
  vis[x] = 1;
  int tmp = tot;
  if (o[x]) ++tot;
  for (int i = last[x]; i; i = e[i].next)
    if (!vis[e[i].to]) dfs(e[i].to);
  if (tot > tmp) ++ans1;
}
int main() {
  for (n = read(), m = read(), i = 1; i < n; ++i) add(read(), read());
  for (i = 1; i <= m; ++i) M[++*M] = x = read(), o[M[*M]] = 1;
  dfs1(1, 0), dfs2(1, 1);
  int k = M[1];
  sort(M + 1, M + m + 1);
  dfs(M[1]), ans1 = (ans1 - 1) << 1;
  for (memset(fa, 0, sizeof fa), dfs1(x, 0), y = x, i = 1; i <= n; ++i)
    if (o[i] && dep[i] > dep[y]) y = i;
  for (memset(fa, 0, sizeof fa), dfs1(y, 0), x = y, i = 1; i <= n; ++i)
    if (o[i] && dep[i] > dep[x]) x = i;
  for (ans1 -= (P = dep[x]), memset(fa, 0, sizeof fa), dfs3(x, 0),
       memset(fa, 0, sizeof fa), dfs3(y, 0), i = 1;
       i <= n; ++i)
    if (o[i] && dep[i] == P) return printf("%d\n%d\n", i, ans1), 0;
}
