#include <bits/stdc++.h>
using namespace std;
const int iinf = 0x7fffffff;
const long long linf = ~(1LL << 63);
const int maxn = 123500;
vector<int> edges[maxn];
vector<int> ed[maxn];
int target[maxn];
bool is_target[maxn];
bool dfs1(int root, int fa = -1) {
  int sz = edges[root].size();
  int to;
  bool ret = false;
  ret |= is_target[root];
  for (int i = 0; i < sz; i++) {
    to = edges[root][i];
    if (to == fa) continue;
    if (dfs1(to, root)) {
      ed[root].push_back(to);
      ed[to].push_back(root);
      ret = true;
    }
  }
  return ret;
}
int ans = 0;
int ans_p = maxn;
int mini[maxn], mini2[maxn];
int mini_p[maxn], mini2_p[maxn];
int tot_edge = 0;
void dfs2(int root, int depth = 0, int fa = -1) {
  int to;
  int sz = ed[root].size();
  mini[root] = 0;
  mini_p[root] = root;
  if (ans == 0) ans_p = min(ans_p, root);
  for (int i = 0; i < sz; i++) {
    to = ed[root][i];
    if (to == fa) continue;
    tot_edge += 1;
    dfs2(to, depth + 1, root);
    if (mini[to] + mini[root] + 1 == ans) {
      ans_p = min(ans_p, min(mini_p[to], mini_p[root]));
    } else if (mini[to] + mini[root] + 1 > ans) {
      ans = mini[to] + mini[root] + 1;
      ans_p = min(mini_p[to], mini_p[root]);
    }
    if (mini[root] < mini[to] + 1) {
      mini[root] = mini[to] + 1;
      mini_p[root] = mini_p[to];
    } else if (mini[root] == mini[to] + 1)
      mini_p[root] = min(mini_p[root], mini_p[to]);
  }
}
int main() {
  ios::sync_with_stdio(0);
  int n, m, a, b;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    edges[a].push_back(b);
    edges[b].push_back(a);
  }
  for (int i = 0; i < m; i++) {
    cin >> target[i];
    is_target[target[i]] = true;
  }
  int rt = target[0];
  dfs1(rt);
  dfs2(rt);
  cout << ans_p << endl;
  cout << 2 * tot_edge - ans << endl;
  return 0;
}
