#include <bits/stdc++.h>
using namespace std;
vector<int> graph[130000], vec(130000);
bool visited[130000], marked[130000], flag;
int cnt[130000], dp[130000], d;
pair<int, int> p;
void dfs(int v, int l) {
  visited[v] = true;
  cnt[v] = marked[v];
  for (int i = 0; i < graph[v].size(); i++) {
    int u = graph[v][i];
    if (!visited[u]) {
      dfs(u, l + 1);
      cnt[v] += cnt[u];
      if (!flag) dp[v] += (cnt[u] ? 2 : 0) + dp[u];
    }
  }
  if (marked[v]) {
    if (p.first < l) {
      p = make_pair(l, v);
    } else if (p.first == l) {
      p.second = min(p.second, v);
    }
  }
}
int main() {
  int n, m, a;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    graph[a].push_back(b), graph[b].push_back(a);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &a);
    marked[a] = true;
  }
  if (m == 1) {
    printf("%d\n%d\n", a, 0);
    return 0;
  }
  p.second = 130000;
  dfs(a, 0);
  memset(visited, false, sizeof(visited));
  flag = true;
  int d = p.second;
  dfs(p.second, 0);
  printf("%d\n%d\n", min(d, p.second), dp[a] - p.first);
  return 0;
}
