#include <bits/stdc++.h>
using namespace std;
int mark[123459], s[123459], dist[123459];
vector<int> a[123459];
void dfs(int p, int v) {
  s[v] = 0;
  if (mark[v]) s[v] = 1;
  for (int i = 0; i < a[v].size(); i++) {
    int u = a[v][i];
    if (u != p) {
      dist[u] = dist[v] + 1;
      dfs(v, u);
      s[v] += s[u];
    }
  }
}
int main() {
  int n, m, p, q, i;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n - 1; i++) {
    scanf("%d%d", &p, &q);
    a[p].push_back(q);
    a[q].push_back(p);
  }
  memset(dist, 0, sizeof(dist));
  memset(mark, 0, sizeof(mark));
  for (i = 1; i <= m; i++) {
    scanf("%d", &p);
    mark[p] = 1;
  }
  dfs(-1, 1);
  int v = -1;
  for (int i = 1; i <= n; i++) {
    if (mark[i] && (v == -1 || dist[i] > dist[v])) v = i;
  }
  memset(dist, 0, sizeof(dist));
  dfs(-1, v);
  int maxs = 0, sum = 0;
  for (i = 1; i <= n; i++) {
    if ((s[i]) && (m - s[i] > 0)) sum += 2;
    if (mark[i]) maxs = max(maxs, dist[i]);
  }
  for (i = 1; i <= n; i++) {
    if ((dist[i] == maxs) && (mark[i]) && (i < v)) v = i;
  }
  printf("%d\n%d", v, sum - maxs);
  return 0;
}
