#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> e[200050];
bool bo[200050];
int in[200050];
int q[200050];
bool ok[200050];
long long ans;
int d[200050][2];
int src[200050][2];
int mx, pos;
void up(int va, int p) {
  if (mx < va || (mx == va && pos > p)) {
    mx = va;
    pos = p;
  }
}
void dfs(int cur, int fa) {
  d[cur][0] = d[cur][1] = -1;
  for (int i = 0; i < e[cur].size(); ++i) {
    int u = e[cur][i];
    if (ok[u]) continue;
    if (u == fa) continue;
    ans += 2;
    dfs(u, cur);
    if (d[u][0] + 1 > d[cur][0] ||
        (d[u][0] + 1 == d[cur][0] && src[u][0] < src[cur][0])) {
      d[cur][1] = d[cur][0];
      src[cur][1] = src[cur][0];
      d[cur][0] = d[u][0] + 1;
      src[cur][0] = src[u][0];
    } else if (d[u][0] + 1 > d[cur][1] ||
               (d[u][0] + 1 == d[cur][1] && src[u][0] < src[cur][1])) {
      d[cur][1] = d[u][0] + 1;
      src[cur][1] = src[u][0];
    }
  }
  if (d[cur][0] == -1) {
    d[cur][0] = 0;
    src[cur][0] = cur;
  }
  up(d[cur][0], ((src[cur][0]) < (cur) ? (src[cur][0]) : (cur)));
  up(d[cur][1], ((src[cur][1]) < (cur) ? (src[cur][1]) : (cur)));
  up(d[cur][0] + d[cur][1],
     ((src[cur][0]) < (src[cur][1]) ? (src[cur][0]) : (src[cur][1])));
}
int main() {
  int n, m;
  int tail = 0;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[x].push_back(y);
    e[y].push_back(x);
    in[x]++;
    in[y]++;
  }
  for (int i = 0; i < m; ++i) {
    int x;
    scanf("%d", &x);
    bo[x] = true;
  }
  for (int i = 1; i <= n; ++i) {
    if (in[i] == 1 && !bo[i]) q[tail++] = i;
  }
  for (int i = 0; i < tail; ++i) {
    int cur = q[i];
    ok[cur] = true;
    for (int j = 0; j < e[cur].size(); ++j) {
      int u = e[cur][j];
      in[u]--;
      if (bo[u]) continue;
      if (in[u] == 1) q[tail++] = u;
    }
  }
  int de = -1, rt;
  for (int i = 1; i <= n; ++i) {
    if (ok[i]) continue;
    if (in[i] > de) {
      de = in[i];
      rt = i;
    }
  }
  ans = 0;
  mx = -1;
  dfs(rt, -1);
  printf("%d\n", pos);
  printf("%d\n", ans - mx);
}
