#include <bits/stdc++.h>
using namespace std;
int n, m;
int lst[123466];
int to[250005], nxt[250005];
int tol = 0;
int mk[123466];
int vis[123466];
void adde(int u, int v) {
  nxt[tol] = lst[u];
  to[tol] = v;
  lst[u] = tol;
  ++tol;
}
int dfs(int u) {
  int key = 0;
  vis[u] = 1;
  if (mk[u]) key = 1;
  for (int p = lst[u]; p >= 0; p = nxt[p]) {
    int v = to[p];
    if (!vis[v]) {
      int ans = dfs(v);
      if (ans) key = 1;
    }
  }
  if (key) mk[u] = 1;
  return key;
}
int S = 0;
int pt;
int mx1[123466], mx2[123466];
int dfs2(int u) {
  int mx1 = 0, mx2 = 0;
  vis[u] = 1;
  for (int p = lst[u]; p >= 0; p = nxt[p]) {
    int v = to[p];
    if (!vis[v] && mk[v]) {
      int ans = dfs2(v) + 1;
      if (mx1 < ans) swap(mx1, ans);
      if (mx2 < ans) swap(mx2, ans);
    }
  }
  ::mx1[u] = mx1;
  ::mx2[u] = mx2;
  if (S < mx1 + mx2) {
    S = mx1 + mx2;
  }
  return mx1;
}
void dfs3(int u, int d) {
  vis[u] = 1;
  if (d == S || mx1[u] == S) {
    pt = min(u, pt);
  }
  for (int p = lst[u]; p >= 0; p = nxt[p]) {
    int v = to[p];
    if (!vis[v] && mk[v]) {
      if (mx1[u] == mx1[v] + 1)
        dfs3(v, max(mx2[u], d) + 1);
      else
        dfs3(v, max(mx1[u], d) + 1);
    }
  }
}
void solve() {
  memset(lst, 0xff, sizeof(lst));
  memset(mk, 0, sizeof(mk));
  memset(vis, 0, sizeof(vis));
  tol = 0;
  S = 0;
  cin >> n >> m;
  pt = n + 1;
  for (int i = 0; i < (n - 1); ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    adde(u, v);
    adde(v, u);
  }
  int rt;
  for (int i = 0; i < (m); ++i) {
    int u;
    scanf("%d", &u);
    mk[u] = 1;
    rt = u;
  }
  if (m == 1) {
    cout << rt << endl;
    cout << "0";
    return;
  }
  dfs(rt);
  int sum = -2;
  for (int i = 1; i <= (n); ++i)
    if (mk[i]) sum += 2;
  memset(vis, 0, sizeof(vis));
  dfs2(rt);
  memset(vis, 0, sizeof(vis));
  dfs3(rt, 0);
  cout << pt << endl;
  cout << sum - S << endl;
}
int main() {
  solve();
  return 0;
}
