#include <bits/stdc++.h>
using namespace std;
vector<int> Q[123459];
int vis[123459];
int vis2[123459];
int ans1, ans2, len;
void dfs(int x, int dis, int pre) {
  if (dis > len && vis[x]) {
    len = dis;
    ans2 = x;
  }
  if (dis == len && vis[x] && x < ans2) ans2 = x;
  for (int i = 0; i < Q[x].size(); i++) {
    if (Q[x][i] == pre) continue;
    dfs(Q[x][i], dis + 1, x);
  }
}
int ppp = 0;
int dfs2(int x, int pre) {
  if (vis[x]) vis2[x]++;
  for (int i = 0; i < Q[x].size(); i++) {
    if (Q[x][i] == pre) continue;
    vis2[x] += dfs2(Q[x][i], x);
  }
  return vis2[x];
}
void dfs3(int x, int pre) {
  if (vis2[x]) ppp++;
  for (int i = 0; i < Q[x].size(); i++) {
    if (Q[x][i] == pre) continue;
    dfs3(Q[x][i], x);
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    Q[x].push_back(y);
    Q[y].push_back(x);
  }
  ans1 = 99999999;
  for (int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    vis[x] = 1;
    ans1 = min(x, ans1);
  }
  if (m == 1) {
    printf("%d\n0\n", ans1);
    return 0;
  }
  len = -1;
  dfs(ans1, 0, -1);
  ans1 = ans2;
  len = -1;
  dfs(ans1, 0, -1);
  dfs2(ans2, -1);
  dfs3(ans2, -1);
  printf("%d\n", min(ans1, ans2));
  if (ppp != 1) ppp--;
  printf("%d\n", ppp * 2 - len);
}
