#include <bits/stdc++.h>
using namespace std;
vector<int> G[200005];
bool mark[200005];
int dist[200005], far, depth[200005];
void dfs(int v, int p, int d) {
  dist[v] = d;
  if ((dist[far] < dist[v] or (dist[far] == dist[v] && v < far)) && mark[v])
    far = v;
  for (int x : G[v])
    if (x != p) dfs(x, v, d + 1);
}
void count(int v, int p, int d) {
  if (mark[v]) depth[v] = d;
  for (int x : G[v])
    if (x != p) {
      count(x, v, d + 1);
      depth[v] = max(depth[v], depth[x]);
    }
}
int roll(int v, int p, bool keep) {
  if (depth[v] == 0) return 0;
  int big = -1, ret = 0;
  for (int x : G[v]) {
    if (x == p) continue;
    if (keep && (big == -1 or depth[x] > depth[big])) big = x;
  }
  if (big != -1 && depth[big]) ret = 1 + roll(big, v, 1);
  for (int x : G[v])
    if (x != p && x != big && depth[x]) ret += 2 + roll(x, v, 0);
  return ret;
}
int main() {
  int n, m, a, b;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 0; i < m; i++) scanf("%d", &a), mark[a] = true;
  dfs(1, 1, 1);
  int cand = far;
  dfs(far, far, 1);
  far = min(cand, far);
  count(far, far, 0);
  printf("%d\n%d\n", far, roll(far, far, 1));
  return 0;
}
