#include <bits/stdc++.h>
using namespace std;
static const int M = 150000;
vector<int> es[M];
int sum[M];
int dep[M];
int fir[M], sec[M], id_mi[M];
int sz[M];
bool mark[M];
int n, m;
bool chk(int a, int b) {
  if (a == -1 || dep[a] < dep[b])
    return true;
  else if (dep[a] == dep[b] && a > b)
    return true;
  return false;
}
pair<int, int> dfs(int u, int fa, int d) {
  pair<int, int> ans, tmp;
  ans.first = 0, ans.second = -1;
  if (mark[u]) ++sz[u];
  dep[u] = d;
  for (int i = 0; i < es[u].size(); ++i) {
    int v = es[u][i];
    if (v == fa) continue;
    tmp = dfs(v, u, d + 1);
    if (ans.second == -1 || ans.first < tmp.first)
      ans = tmp;
    else if (ans.first == tmp.first && id_mi[ans.second] < id_mi[tmp.second])
      ans = tmp;
    if (~fir[v]) {
      if (chk(fir[u], fir[v])) {
        if (chk(sec[u], fir[u])) sec[u] = fir[u];
        fir[u] = fir[v];
      } else if (chk(sec[u], fir[v]))
        sec[u] = fir[v];
    }
    sz[u] += sz[v];
    sum[u] += sum[v];
  }
  if (mark[u]) {
    if (chk(fir[u], u)) {
      if (chk(sec[u], u)) sec[u] = fir[u];
      fir[u] = u;
    } else if (chk(sec[u], u))
      sec[u] = u;
  }
  if (~fir[u] && ~sec[u]) {
    id_mi[u] = min(fir[u], sec[u]);
    if (ans.first < dep[fir[u]] + dep[sec[u]] - dep[u] * 2) {
      ans.first = dep[fir[u]] + dep[sec[u]] - dep[u] * 2;
      ans.second = u;
    } else if (ans.first == dep[fir[u]] + dep[sec[u]] - dep[u] * 2 &&
               id_mi[ans.second] > id_mi[u]) {
      ans.second = u;
    }
  }
  if (sz[u] > 0 && sz[u] < m) ++sum[u];
  return ans;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d %d", &u, &v);
    es[u].push_back(v);
    es[v].push_back(u);
  }
  int x;
  for (int i = 1; i <= m; ++i, mark[x] = 1) scanf("%d", &x);
  memset(fir, -1, sizeof(fir));
  memset(sec, -1, sizeof(sec));
  pair<int, int> ans = dfs(1, 1, 0);
  printf("%d\n%d\n", ~ans.second ? id_mi[ans.second] : x,
         sum[1] * 2 - ans.first);
  return 0;
}
