#include <bits/stdc++.h>
using namespace std;
const int M = 130000;
int n, m, R, A, S, D, h[M];
bool f[M];
vector<int> g[M];
bool dfs(int v, int p = 0) {
  bool c = f[v];
  h[v] = h[p] + 1;
  if (c and h[v] >= D) R = v, D = h[v];
  if (c and v < S and (!h[v] or h[v] == D)) S = v;
  for (int i = 0; i < g[v].size(); i++)
    if (g[v][i] != p) c |= dfs(g[v][i], v);
  if (c) A++;
  return c;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int v, u, i = n - 1; i--;) {
    cin >> v >> u;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  for (h[0] = -1; m--; cin >> R, f[R] = true)
    ;
  dfs(R);
  dfs(R);
  S = M, dfs(R);
  dfs(R);
  cout << S << endl << (A - 4) / 2 - D << endl;
  return 0;
}
