#include <bits/stdc++.h>
using namespace std;
vector<int> adj[223456];
int vis[223456], dis[223456], dis2[223456];
int deg[223456];
bool nd_at[223456];
int n, m, u, v, ans;
queue<int> q;
void get_dis(int nd, int par, int time, int &far_nd, int &far) {
  dis[nd] = time;
  if (dis[nd] > far) {
    far = dis[nd];
    far_nd = nd;
  }
  for (int t : adj[nd]) {
    if (t != par && !vis[t]) get_dis(t, nd, time + 1, far_nd, far);
  }
}
void dfs(int nd, int par, int time) {
  dis[nd] = max(dis[nd], time);
  for (int to : adj[nd]) {
    if (!vis[to] && to != par) dfs(to, nd, time + 1);
  }
}
void dfs2(int nd, int par, int time) {
  dis2[nd] = max(dis2[nd], time);
  for (int to : adj[nd]) {
    if (!vis[to] && to != par) dfs(to, nd, time + 1);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n - 1; ++i) {
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &u);
    nd_at[u] = 1;
  }
  for (int i = 1; i <= n; ++i) {
    deg[i] = adj[i].size();
    if (adj[i].size() == 1) q.push(i);
  }
  int node = n;
  while (!q.empty()) {
    int d = q.front();
    q.pop();
    if (nd_at[d]) continue;
    vis[d] = 1;
    --node;
    for (int to : adj[d]) {
      deg[to]--;
      if (deg[to] == 1) q.push(to);
    }
  }
  int far_nd = 0, far = 0, start;
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) {
      get_dis(i, -1, 0, far_nd, far);
      break;
    }
  dfs(far_nd, -1, 0);
  int ans = 0, mx = -1, cur = 0;
  for (int i = 1; i <= n; ++i) {
    if (vis[i]) continue;
    mx = max(mx, dis[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if (vis[i]) continue;
    if (dis[i] == mx) {
      cur = i;
      break;
    }
  }
  dfs2(cur, -1, 0);
  mx = -1;
  for (int i = 1; i <= n; ++i) {
    if (vis[i]) continue;
    mx = max(mx, dis[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if (vis[i]) continue;
    if (dis[i] == mx) {
      cur = i;
      break;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (vis[i]) continue;
    if (dis2[i] == mx) {
      cur = min(i, cur);
      break;
    }
    if (dis2[i] > mx) {
      mx = dis2[i];
      cur = i;
      break;
    }
  }
  ans = 2 * (node - 1) - mx;
  printf("%d\n%d", cur, ans);
  return 0;
}
