#include <bits/stdc++.h>
using namespace std;
struct E {
  int x, y;
} e[124000 * 2];
int f[124000], sum[124000], att[124000], ned[124000], dis[124000], vis[124000];
int n, m, tt = 0;
bool cmp(E p, E q) {
  if (p.x == q.x)
    return p.y < q.y;
  else
    return p.x < q.x;
}
void dfs(int x) {
  sum[x] = att[x];
  for (int i = f[x]; i < f[x + 1]; i++) {
    if (!vis[e[i].y]) {
      vis[e[i].y] = 1;
      dfs(e[i].y);
      sum[x] += sum[e[i].y];
    }
  }
}
void dfs2(int x) {
  if (!sum[x]) return;
  int bj = 0;
  for (int i = f[x]; i < f[x + 1]; i++) {
    if (!vis[e[i].y]) {
      vis[e[i].y] = 1;
      dfs2(e[i].y);
      if (sum[e[i].y] == m) {
        bj = 1;
        break;
      }
    }
  }
  if (!bj || att[x]) {
    ned[x] = 1;
    tt++;
  }
}
void dfs3(int x) {
  for (int i = f[x]; i < f[x + 1]; i++) {
    if (ned[e[i].y] && !vis[e[i].y]) {
      vis[e[i].y] = 1;
      dis[e[i].y] = dis[x] + 1;
      dfs3(e[i].y);
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    e[i].x = x;
    e[i].y = y;
    e[i + n - 1].x = y;
    e[i + n - 1].y = x;
  }
  for (int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    att[x] = 1;
  }
  sort(e + 1, e + 1 + 2 * (n - 1), cmp);
  for (int i = 1; i <= 2 * (n - 1); i++)
    if (f[e[i].x] == 0) f[e[i].x] = i;
  f[n + 1] = 2 * (n - 1) + 1;
  for (int i = 2 * (n - 1); i >= 1; i--)
    if (f[i] == 0) f[i] = f[i + 1];
  vis[1] = 1;
  dfs(1);
  memset(vis, 0, sizeof(vis));
  vis[1] = 1;
  dfs2(1);
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++)
    if (ned[i]) {
      vis[i] = 1;
      dfs3(i);
    }
  int maxp, maxx = -1;
  for (int i = 1; i <= n; i++)
    if (ned[i] && maxx < dis[i]) {
      maxp = i;
      maxx = dis[i];
    }
  memset(dis, 0, sizeof(dis));
  memset(vis, 0, sizeof(vis));
  vis[maxp] = 1;
  dfs3(maxp);
  int ans1 = maxp;
  maxx = -1;
  for (int i = 1; i <= n; i++)
    if (ned[i] && maxx < dis[i]) {
      maxp = i;
      maxx = dis[i];
    }
  int ans = (tt - 1) * 2 - maxx;
  printf("%d\n%d\n", min(ans1, maxp), ans);
  return 0;
}
