#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int N = 123456 + 100;
using namespace std;
int n, m;
vector<int> g[N];
int s[N], ans1;
void read() {
  scanf("%d%d", &n, &m);
  int a, b;
  for (int i = (1); i <= (n - 1); i++) {
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  ans1 = INF;
  while (m--) {
    scanf("%d", &a);
    s[a] = 1;
    ans1 = ((ans1) < (a) ? (ans1) : (a));
  }
}
int ans2, max_len;
void dfs(int u, int fa, int len) {
  if (s[u] && max_len < len) {
    max_len = len;
    ans2 = u;
  } else if (s[u] && len == max_len)
    ans2 = ((ans2) < (u) ? (ans2) : (u));
  for (int i = 0; i < (g[u].size()); i++) {
    int v = g[u][i];
    if (v == fa) continue;
    dfs(v, u, len + 1);
  }
}
int sum[N];
void dp(int u, int fa) {
  if (sum[u] != -1) return;
  sum[u] = 0;
  for (int j = 0; j < (g[u].size()); j++) {
    int v = g[u][j];
    if (v == fa) continue;
    dp(v, u);
    if (sum[v] == -2) continue;
    sum[u] += sum[v] + 2;
  }
  if (!sum[u] && !s[u]) sum[u] = -2;
}
void solve() {
  ans2 = INF;
  dfs(ans1, -1, 0);
  ans1 = ans2;
  max_len = 0;
  ans2 = INF;
  dfs(ans1, -1, 0);
  memset(sum, -1, sizeof(sum));
  dp(ans1, -1);
  printf("%d\n%d\n", ((ans1) < (ans2) ? (ans1) : (ans2)), sum[ans1] - max_len);
}
int main() {
  read();
  solve();
  return 0;
}
