#include <bits/stdc++.h>
using namespace std;
vector<int> nodes[130000];
bool keep[130000];
int dia, y, cnt;
void dfs_keep(int u, int from) {
  for (int i = 0; i < nodes[u].size(); i++) {
    int v = nodes[u][i];
    if (v == from) continue;
    dfs_keep(v, u);
    keep[u] |= keep[v];
  }
  if (keep[u]) cnt++;
  return;
}
void dfs_dia(int u, int from, int len) {
  if (len > dia || (len == dia && u < y)) dia = len, y = u;
  for (int i = 0; i < nodes[u].size(); i++) {
    int v = nodes[u][i];
    if (v == from || !keep[v]) continue;
    dfs_dia(v, u, len + 1);
  }
  return;
}
int main() {
  int n, m, i, u, v, x;
  scanf("%d %d", &n, &m);
  for (i = 1; i < n; i++) {
    cin >> u >> v;
    nodes[u].push_back(v);
    nodes[v].push_back(u);
  }
  for (i = 1; i <= m; i++) cin >> x, keep[x] = true;
  dfs_keep(x, 0);
  y = x;
  dfs_dia(x, 0, 0);
  x = y, dia = 0;
  dfs_dia(x, 0, 0);
  printf("%d\n%d", min(x, y), 2 * (cnt - 1) - dia);
  return 0;
}
