#include <bits/stdc++.h>
using namespace std;
int n, m, c, t, cnt[131313], dis[131313];
bool ok[131313];
pair<int, int> f[131313], s[131313];
vector<int> V[131313];
int op, vo = -1;
void dfs(int id, int prev) {
  if (prev != -1) dis[id] = dis[prev] + 1;
  for (int i = (0); i <= ((int)V[id].size() - 1); i++) {
    int to = V[id][i];
    if (to == prev) continue;
    dfs(to, id);
    cnt[id] += cnt[to];
  }
  if (ok[id]) cnt[id]++;
  return;
}
void dfs2(int id, int prev) {
  f[id].second = id;
  for (int i = (0); i <= ((int)V[id].size() - 1); i++) {
    int to = V[id][i];
    if (to == prev) continue;
    if (cnt[to] == 0) continue;
    t++;
    dfs2(to, id);
    if (make_pair(f[to].first + 1, to) > f[id]) {
      s[id] = f[id];
      f[id] = make_pair(f[to].first + 1, to);
    } else if (make_pair(f[to].first + 1, to) > s[id]) {
      s[id] = make_pair(f[to].first + 1, to);
    }
  }
  return;
}
void dfs3(int id, int prev, int dia) {
  int gg = max(dia, f[id].first);
  if (gg > vo || (gg == vo && id < op)) {
    op = id;
    vo = gg;
  }
  for (int i = (0); i <= ((int)V[id].size() - 1); i++) {
    int to = V[id][i];
    if (to == prev) continue;
    if (cnt[to] == 0) continue;
    if (to == f[id].second)
      dfs3(to, id, max(dia, s[id].first) + 1);
    else
      dfs3(to, id, max(dia, f[id].first) + 1);
  }
  return;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = (2); i <= (n); i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    V[a].push_back(b);
    V[b].push_back(a);
  }
  for (int i = (1); i <= (m); i++) {
    int a;
    scanf("%d", &a);
    ok[a] = true;
    c = a;
  }
  dfs(c, -1);
  dfs2(c, -1);
  dfs3(c, -1, 0);
  printf("%d\n%d\n", op, 2 * t - vo);
  return 0;
}
