#include <bits/stdc++.h>
using namespace std;
const int N = 127756;
int n, m, t, dl;
vector<int> g[N], path, ans;
vector<char> used, U, is;
pair<int, int> far;
bool build(int v) {
  used[v] = 1;
  int f = 0;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (!used[to] && build(to)) f = 1;
  }
  if (f || is[v]) {
    U[v] = 0;
    return 1;
  }
  return 0;
}
void dfs(int v, int len = 0) {
  used[v] = 1;
  if (len > far.first) {
    far.first = len;
    far.second = v;
  }
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (!used[to]) dfs(to, len + 1);
  }
}
bool find_path(int v) {
  used[v] = 1;
  if (v == t) {
    path.push_back(v);
    return 1;
  }
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (!used[to] && find_path(to)) {
      path.push_back(v);
      return 1;
    }
  }
  return 0;
}
void find_ans(int v, int len = 0) {
  used[v] = 1;
  if (len >= dl) ans.push_back(v);
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (!used[to]) find_ans(to, len + 1);
  }
}
int main() {
  far.first = far.second = -1;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--, v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  is.resize(n);
  U.assign(n, 1);
  used.resize(n);
  int a;
  for (int i = 0; i < m; i++) {
    int v;
    scanf("%d", &v);
    is[--v] = 1;
    a = v;
  }
  U[a] = 0;
  build(a);
  used = U;
  dfs(a);
  int s = far.second;
  far.first = far.second = -1;
  used = U;
  dfs(s);
  t = far.second;
  used = U;
  find_path(s);
  int mid = path[path.size() / 2];
  int anslen = 0;
  for (int i = 0; i < U.size(); i++) anslen += 1 - U[i];
  anslen--;
  anslen *= 2;
  anslen -= path.size() - 1;
  used = U;
  far.first = far.second = -1;
  dfs(mid);
  used = U;
  dl = far.first;
  find_ans(mid);
  if (path.size() % 2 == 0) mid = path[path.size() / 2 - 1];
  used = U;
  find_ans(mid);
  sort(ans.begin(), ans.end());
  printf("%d\n%d", ans[0] + 1, anslen);
}
