#include <bits/stdc++.h>
const double PI = 3.1415926535897932384626433832795;
using namespace std;
long long mod = 1e9 + 7;
vector<vector<int> > G;
bool subtr[123457], attacked[123457];
int deg[123457];
int node = 123457, dist, sz;
void dfs(int u, int prev) {
  int n = G[u].size();
  if (attacked[u]) subtr[u] = true;
  for (int i = 0; i < n; ++i) {
    if (G[u][i] == prev) continue;
    dfs(G[u][i], u);
    if (subtr[G[u][i]]) subtr[u] = true, deg[u]++, sz++;
  }
}
int find_center() {
  int n = G.size(), curr;
  queue<int> Q;
  for (int i = 1; i < n; ++i) {
    if (attacked[i] && deg[i] == 0) Q.push(i);
  }
  while (!Q.empty()) {
    curr = Q.front();
    Q.pop();
    int n = G[curr].size();
    for (int i = 0; i < n; ++i) {
      deg[G[curr][i]]--;
      if (subtr[G[curr][i]] && deg[G[curr][i]] == 0) Q.push(G[curr][i]);
    }
  }
  return curr;
}
void dfs2(int u, int prev, int len) {
  if (len == dist) node = min(node, u);
  if (len > dist) {
    dist = len;
    node = u;
  }
  int n = G[u].size();
  for (int i = 0; i < n; ++i) {
    if (G[u][i] == prev || !subtr[G[u][i]]) continue;
    dfs2(G[u][i], u, len + 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(12);
  cout << fixed;
  int n, m, u, v;
  cin >> n >> m;
  G.resize(n + 1);
  for (int i = 0; i < n - 1; ++i) {
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 0; i < m; ++i) {
    cin >> u;
    attacked[u] = true;
  }
  dfs(u, -1);
  int center = find_center();
  dfs2(center, -1, 0);
  int ans = node;
  dfs2(node, -1, 0);
  ans = min(ans, node);
  cout << ans << "\n" << 2 * sz - dist << '\n';
  return 0;
}
